Module: OM::XML::Accessors
- Defined in:
- lib/om/xml/accessors.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.included(klass) ⇒ Object
Instance Methods – These methods will be available on instances of OM classes (ie. the actual xml documents).
Instance Method Summary collapse
-
#retrieve(*args) ⇒ Object
*args Variable length array of values in format [:accessor_name, index, :accessor_name …] example: [:person, 1, :first_name] Currently, indexes must be integers.
Class Method Details
.included(klass) ⇒ Object
Instance Methods – These methods will be available on instances of OM classes (ie. the actual xml documents)
118 119 120 |
# File 'lib/om/xml/accessors.rb', line 118 def self.included(klass) klass.extend(ClassMethods) end |
Instance Method Details
#retrieve(*args) ⇒ Object
*args Variable length array of values in format [:accessor_name, index, :accessor_name …] example: [:person, 1, :first_name] Currently, indexes must be integers.
125 126 127 128 |
# File 'lib/om/xml/accessors.rb', line 125 def retrieve(*args) xpath = self.class.accessor_xpath(*args) ng_xml.xpath(xpath, "oxns"=>"http://www.loc.gov/mods/v3") end |