Class: TwitterCldr::Resources::CldrDTD
- Inherits:
-
Object
- Object
- TwitterCldr::Resources::CldrDTD
- Defined in:
- lib/twitter_cldr/resources/cldr_dtd.rb
Defined Under Namespace
Classes: Attr
Instance Attribute Summary collapse
-
#cldr_requirement ⇒ Object
readonly
Returns the value of attribute cldr_requirement.
Instance Method Summary collapse
- #find_attr(element_name, attr_name) ⇒ Object
-
#initialize(cldr_requirement) ⇒ CldrDTD
constructor
A new instance of CldrDTD.
- #schema ⇒ Object
Constructor Details
#initialize(cldr_requirement) ⇒ CldrDTD
Returns a new instance of CldrDTD.
81 82 83 |
# File 'lib/twitter_cldr/resources/cldr_dtd.rb', line 81 def initialize(cldr_requirement) @cldr_requirement = cldr_requirement end |
Instance Attribute Details
#cldr_requirement ⇒ Object (readonly)
Returns the value of attribute cldr_requirement.
79 80 81 |
# File 'lib/twitter_cldr/resources/cldr_dtd.rb', line 79 def cldr_requirement @cldr_requirement end |
Instance Method Details
#find_attr(element_name, attr_name) ⇒ Object
85 86 87 88 89 90 |
# File 'lib/twitter_cldr/resources/cldr_dtd.rb', line 85 def find_attr(element_name, attr_name) elements[element_name] ||= {} elements[element_name][attr_name] ||= Attr.new( attr_name, element_name, self ) end |
#schema ⇒ Object
92 93 94 |
# File 'lib/twitter_cldr/resources/cldr_dtd.rb', line 92 def schema @schema ||= File.read(schema_path).split("\n") end |