Class: Rocx::Properties::PhoneticGuideLanguage
- Inherits:
-
ValueProperty
- Object
- BaseProperty
- ValueProperty
- Rocx::Properties::PhoneticGuideLanguage
- Defined in:
- lib/rocx/properties/phonetic_guide_language.rb
Instance Attribute Summary
Attributes inherited from ValueProperty
Attributes inherited from BaseProperty
Instance Method Summary collapse
Methods inherited from ValueProperty
#initialize, #render?, #to_xml
Methods inherited from BaseProperty
#default_name, #default_tag, name, #name, #render?, tag, #tag
Constructor Details
This class inherits a constructor from Rocx::Properties::ValueProperty
Instance Method Details
#invalid_message ⇒ Object
11 12 13 |
# File 'lib/rocx/properties/phonetic_guide_language.rb', line 11 def "Invalid #{name}: must be a language code (RFC 4646)" end |
#valid? ⇒ Boolean
7 8 9 |
# File 'lib/rocx/properties/phonetic_guide_language.rb', line 7 def valid? value =~ /[a-z]{2}-[A-Z]{2}/ end |