Class: MDEXClient::MData::Record
- Defined in:
- lib/mdex_client/mdata/record.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Attributes
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#id ⇒ Object
Returns the value of attribute id.
-
#snippets ⇒ Object
Returns the value of attribute snippets.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(element_or_hash = nil) ⇒ Record
constructor
A new instance of Record.
- #initialize_from_element! ⇒ Object
Methods inherited from Node
#css, #dimension_value_state_list, #property_list, #record_list, #xpath
Constructor Details
#initialize(element_or_hash = nil) ⇒ Record
Returns a new instance of Record.
43 44 45 46 |
# File 'lib/mdex_client/mdata/record.rb', line 43 def initialize(element_or_hash=nil) @attributes = Attributes.new super(element_or_hash) end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
41 42 43 |
# File 'lib/mdex_client/mdata/record.rb', line 41 def attributes @attributes end |
#id ⇒ Object
Returns the value of attribute id.
41 42 43 |
# File 'lib/mdex_client/mdata/record.rb', line 41 def id @id end |
#snippets ⇒ Object
Returns the value of attribute snippets.
41 42 43 |
# File 'lib/mdex_client/mdata/record.rb', line 41 def snippets @snippets end |
Instance Method Details
#initialize_from_element! ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'lib/mdex_client/mdata/record.rb', line 48 def initialize_from_element! @id = @element["Id"] xpath("mdata:Attributes/mdata:AssignedDimensionValue | mdata:Attributes/mdata:Property").each do |attribute| @attributes << attribute end @snippets = property_list("mdata:Snippets/mdata:Snippet") end |