Class: Perpetuity::Postgres::ValueWithAttribute
- Inherits:
-
Object
- Object
- Perpetuity::Postgres::ValueWithAttribute
- Defined in:
- lib/perpetuity/postgres/value_with_attribute.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #embedded? ⇒ Boolean
-
#initialize(value, attribute) ⇒ ValueWithAttribute
constructor
A new instance of ValueWithAttribute.
- #method_missing(*args, &block) ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(value, attribute) ⇒ ValueWithAttribute
Returns a new instance of ValueWithAttribute.
5 6 7 8 |
# File 'lib/perpetuity/postgres/value_with_attribute.rb', line 5 def initialize value, attribute @value = value @attribute = attribute end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object
18 19 20 |
# File 'lib/perpetuity/postgres/value_with_attribute.rb', line 18 def method_missing *args, &block value.send(*args, &block) end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
4 5 6 |
# File 'lib/perpetuity/postgres/value_with_attribute.rb', line 4 def attribute @attribute end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/perpetuity/postgres/value_with_attribute.rb', line 4 def value @value end |
Instance Method Details
#embedded? ⇒ Boolean
14 15 16 |
# File 'lib/perpetuity/postgres/value_with_attribute.rb', line 14 def attribute. end |
#type ⇒ Object
10 11 12 |
# File 'lib/perpetuity/postgres/value_with_attribute.rb', line 10 def type attribute.type end |