Class: MDEXClient::MData::RefinementConfig
- Defined in:
- lib/mdex_client/mdata/refinement_config.rb
Instance Attribute Summary collapse
-
#dimension_value_id ⇒ Object
Returns the value of attribute dimension_value_id.
-
#expose ⇒ Object
writeonly
Sets the attribute expose.
-
#limit_dimension_values ⇒ Object
writeonly
Sets the attribute limit_dimension_values.
-
#maximum_dimension_value_count ⇒ Object
Returns the value of attribute maximum_dimension_value_count.
-
#order_by_record_count ⇒ Object
writeonly
Sets the attribute order_by_record_count.
Attributes inherited from Node
Instance Method Summary collapse
- #expose? ⇒ Boolean
- #initialize_from_element! ⇒ Object
- #limit_dimension_values? ⇒ Boolean
- #order_by_record_count? ⇒ Boolean
- #write_xml!(xml) ⇒ Object
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_value_id ⇒ Object
Returns the value of attribute dimension_value_id.
6 7 8 |
# File 'lib/mdex_client/mdata/refinement_config.rb', line 6 def dimension_value_id @dimension_value_id end |
#expose=(value) ⇒ Object (writeonly)
Sets the attribute expose
7 8 9 |
# File 'lib/mdex_client/mdata/refinement_config.rb', line 7 def expose=(value) @expose = value end |
#limit_dimension_values=(value) ⇒ Object (writeonly)
Sets the attribute limit_dimension_values
7 8 9 |
# File 'lib/mdex_client/mdata/refinement_config.rb', line 7 def limit_dimension_values=(value) @limit_dimension_values = value end |
#maximum_dimension_value_count ⇒ Object
Returns the value of attribute maximum_dimension_value_count.
6 7 8 |
# File 'lib/mdex_client/mdata/refinement_config.rb', line 6 def maximum_dimension_value_count @maximum_dimension_value_count end |
#order_by_record_count=(value) ⇒ Object (writeonly)
Sets the attribute order_by_record_count
7 8 9 |
# File 'lib/mdex_client/mdata/refinement_config.rb', line 7 def order_by_record_count=(value) @order_by_record_count = value end |
Instance Method Details
#expose? ⇒ Boolean
20 21 22 |
# File 'lib/mdex_client/mdata/refinement_config.rb', line 20 def expose? @expose end |
#initialize_from_element! ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/mdex_client/mdata/refinement_config.rb', line 9 def initialize_from_element! @dimension_value_id = @element["DimensionValueId"].to_i @expose = (@element["Expose"] == "true") @limit_dimension_values = (@element["LimitDimensionValues"] == "true") @order_by_record_count = (@element["OrderByRecordCount"] == "true") if element["MaximumDimensionValueCount"] @maximum_dimension_value_count = @element["MaximumDimensionValueCount"].to_i end end |
#limit_dimension_values? ⇒ Boolean
24 25 26 |
# File 'lib/mdex_client/mdata/refinement_config.rb', line 24 def limit_dimension_values? @limit_dimension_values end |
#order_by_record_count? ⇒ Boolean
28 29 30 |
# File 'lib/mdex_client/mdata/refinement_config.rb', line 28 def order_by_record_count? @order_by_record_count end |
#write_xml!(xml) ⇒ Object
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/mdex_client/mdata/refinement_config.rb', line 32 def write_xml!(xml) attrs = { "DimensionValueId" => dimension_value_id } %w(Expose LimitDimensionValues OrderByRecordCount).each do |attribute| value = self.send("#{attribute.underscore}?") attrs[attribute] = value.to_s unless value.nil? end attrs["MaximumDimensionValueCount"] = maximum_dimension_value_count unless maximum_dimension_value_count.nil? xml.mdata :RefinementConfig, attrs end |