Class: TwitterCldr::Resources::CldrDocumentSet::Element

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/twitter_cldr/resources/cldr_document_set.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#docsetObject (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

#elementObject (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