Class: TwitterCldr::Resources::CldrDocumentSet::Element
- Inherits:
-
Object
- Object
- TwitterCldr::Resources::CldrDocumentSet::Element
- Extended by:
- Forwardable
- Defined in:
- lib/twitter_cldr/resources/cldr_document_set.rb
Instance Attribute Summary collapse
-
#docset ⇒ Object
readonly
Returns the value of attribute docset.
-
#element ⇒ Object
readonly
Returns the value of attribute element.
Instance Method Summary collapse
-
#initialize(docset, element) ⇒ Element
constructor
A new instance of Element.
- #xpath(path) ⇒ Object
Constructor Details
#initialize(docset, element) ⇒ Element
Returns a new instance of Element.
20 21 22 23 |
# File 'lib/twitter_cldr/resources/cldr_document_set.rb', line 20 def initialize(docset, element) @docset = docset @element = element end |
Instance Attribute Details
#docset ⇒ Object (readonly)
Returns the value of attribute docset.
18 19 20 |
# File 'lib/twitter_cldr/resources/cldr_document_set.rb', line 18 def docset @docset end |
#element ⇒ Object (readonly)
Returns the value of attribute element.
18 19 20 |
# File 'lib/twitter_cldr/resources/cldr_document_set.rb', line 18 def element @element end |
Instance Method Details
#xpath(path) ⇒ Object
25 26 27 28 |
# File 'lib/twitter_cldr/resources/cldr_document_set.rb', line 25 def xpath(path) path = CldrDocumentSet.join_xpaths(docset.path_for(element), path) docset.xpath(path) end |