Class: MDEXClient::MData::DimensionValue
- Defined in:
- lib/mdex_client/mdata/dimension_value.rb
Instance Attribute Summary collapse
-
#dimension ⇒ Object
Returns the value of attribute dimension.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#properties ⇒ Object
Returns the value of attribute properties.
-
#static_record_count ⇒ Object
Returns the value of attribute static_record_count.
-
#values ⇒ Object
Returns the value of attribute values.
Attributes inherited from Node
Instance Method Summary collapse
Methods inherited from Node
#css, #dimension_value_state_list, #initialize, #property_list, #record_list, #xpath
Constructor Details
This class inherits a constructor from MDEXClient::MData::Node
Instance Attribute Details
#dimension ⇒ Object
Returns the value of attribute dimension.
6 7 8 |
# File 'lib/mdex_client/mdata/dimension_value.rb', line 6 def dimension @dimension end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/mdex_client/mdata/dimension_value.rb', line 6 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/mdex_client/mdata/dimension_value.rb', line 6 def name @name end |
#parent ⇒ Object
Returns the value of attribute parent.
6 7 8 |
# File 'lib/mdex_client/mdata/dimension_value.rb', line 6 def parent @parent end |
#properties ⇒ Object
Returns the value of attribute properties.
6 7 8 |
# File 'lib/mdex_client/mdata/dimension_value.rb', line 6 def properties @properties end |
#static_record_count ⇒ Object
Returns the value of attribute static_record_count.
6 7 8 |
# File 'lib/mdex_client/mdata/dimension_value.rb', line 6 def static_record_count @static_record_count end |
#values ⇒ Object
Returns the value of attribute values.
6 7 8 |
# File 'lib/mdex_client/mdata/dimension_value.rb', line 6 def values @values end |
Instance Method Details
#ancestors ⇒ Object
40 41 42 43 44 |
# File 'lib/mdex_client/mdata/dimension_value.rb', line 40 def ancestors a = parent ? parent.ancestors : [] a << parent if parent a end |
#initialize_from_element! ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/mdex_client/mdata/dimension_value.rb', line 8 def initialize_from_element! @id = @element["Id"].to_i @name = @element["Name"] @is_leaf = @element["IsLeaf"] == "true" @is_navigable = @element["IsNavigable"] == "true" @static_record_count = @element["StaticRecordCount"].to_i @values = {} xpath("mdata:DimensionValues/mdata:DimensionValue").each do |value| dv = DimensionValue.new(value) dv.parent = self @values[dv.id] = dv end @properties = property_list("mdata:Properties/mdata:Property") end |
#leaf? ⇒ Boolean
32 33 34 |
# File 'lib/mdex_client/mdata/dimension_value.rb', line 32 def leaf? @is_leaf end |
#navigable? ⇒ Boolean
36 37 38 |
# File 'lib/mdex_client/mdata/dimension_value.rb', line 36 def navigable? @is_navigable end |