Class: Cubicle::Expansion
Instance Attribute Summary collapse
-
#index_variable ⇒ Object
readonly
Returns the value of attribute index_variable.
-
#value_variable ⇒ Object
readonly
Returns the value of attribute value_variable.
Attributes inherited from Member
#alias_list, #condition, #expression, #expression_type, #field_name, #name, #options
Instance Method Summary collapse
-
#initialize(*args) ⇒ Expansion
constructor
A new instance of Expansion.
Methods inherited from Member
#included_in?, #matches, #to_js_keys, #to_js_value
Constructor Details
#initialize(*args) ⇒ Expansion
Returns a new instance of Expansion.
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/cubicle/expansion.rb', line 4 def initialize(*args) super @value_variable = self.[:value] || self.[:value_variable] || "#{self.name.to_s.singularize}_value" @index_variable = self.[:index] || self.[:index_variable] || self.[:key] || self.[:key_variable] || "#{self.name.to_s.singularize}_key" end |
Instance Attribute Details
#index_variable ⇒ Object (readonly)
Returns the value of attribute index_variable.
3 4 5 |
# File 'lib/cubicle/expansion.rb', line 3 def index_variable @index_variable end |
#value_variable ⇒ Object (readonly)
Returns the value of attribute value_variable.
3 4 5 |
# File 'lib/cubicle/expansion.rb', line 3 def value_variable @value_variable end |