Class: EnoughFields::AttributeValue
- Inherits:
-
Object
- Object
- EnoughFields::AttributeValue
- Defined in:
- lib/enough_fields/attribute_value.rb
Instance Attribute Summary collapse
-
#call_stack ⇒ Object
Returns the value of attribute call_stack.
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(value, klass, field, call_stack) ⇒ AttributeValue
constructor
A new instance of AttributeValue.
- #to_value ⇒ Object
Constructor Details
#initialize(value, klass, field, call_stack) ⇒ AttributeValue
Returns a new instance of AttributeValue.
6 7 8 9 10 11 |
# File 'lib/enough_fields/attribute_value.rb', line 6 def initialize(value, klass, field, call_stack) @value = value @klass = klass @field = field @call_stack = call_stack end |
Instance Attribute Details
#call_stack ⇒ Object
Returns the value of attribute call_stack.
3 4 5 |
# File 'lib/enough_fields/attribute_value.rb', line 3 def call_stack @call_stack end |
#field ⇒ Object (readonly)
Returns the value of attribute field.
3 4 5 |
# File 'lib/enough_fields/attribute_value.rb', line 3 def field @field end |
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
3 4 5 |
# File 'lib/enough_fields/attribute_value.rb', line 3 def klass @klass end |
Instance Method Details
#eql?(other) ⇒ Boolean
17 18 19 20 21 |
# File 'lib/enough_fields/attribute_value.rb', line 17 def eql?( other ) self.klass == other.klass && self.field == other.field && self.call_stack == other.call_stack end |
#hash ⇒ Object
23 24 25 |
# File 'lib/enough_fields/attribute_value.rb', line 23 def hash self.klass.hash + self.field.hash + self.call_stack.hash end |
#to_value ⇒ Object
13 14 15 |
# File 'lib/enough_fields/attribute_value.rb', line 13 def to_value @value end |