Class: Arel::Nodes::DeltaAttribute
- Inherits:
-
Object
- Object
- Arel::Nodes::DeltaAttribute
- Defined in:
- lib/delta_attributes3_2/update_statement.rb
Instance Attribute Summary collapse
-
#arel_node ⇒ Object
Returns the value of attribute arel_node.
-
#new_value ⇒ Object
Returns the value of attribute new_value.
-
#old_value ⇒ Object
Returns the value of attribute old_value.
Instance Method Summary collapse
-
#initialize(arel_node, new_value = nil, old_value = nil) ⇒ DeltaAttribute
constructor
A new instance of DeltaAttribute.
- #valid? ⇒ Boolean
Constructor Details
#initialize(arel_node, new_value = nil, old_value = nil) ⇒ DeltaAttribute
Returns a new instance of DeltaAttribute.
8 9 10 11 12 |
# File 'lib/delta_attributes3_2/update_statement.rb', line 8 def initialize(arel_node, new_value = nil, old_value = nil) @arel_node = arel_node @new_value = new_value @old_value = old_value end |
Instance Attribute Details
#arel_node ⇒ Object
Returns the value of attribute arel_node.
6 7 8 |
# File 'lib/delta_attributes3_2/update_statement.rb', line 6 def arel_node @arel_node end |
#new_value ⇒ Object
Returns the value of attribute new_value.
6 7 8 |
# File 'lib/delta_attributes3_2/update_statement.rb', line 6 def new_value @new_value end |
#old_value ⇒ Object
Returns the value of attribute old_value.
6 7 8 |
# File 'lib/delta_attributes3_2/update_statement.rb', line 6 def old_value @old_value end |
Instance Method Details
#valid? ⇒ Boolean
14 15 16 |
# File 'lib/delta_attributes3_2/update_statement.rb', line 14 def valid? @arel_node && !new_value.nil? && !old_value.nil? end |