Class: Arel::Nodes::Grouping
- Inherits:
-
Object
- Object
- Arel::Nodes::Grouping
- Defined in:
- lib/active_record/virtual_attributes/virtual_arel.rb
Overview
in essence, this is our Arel::Nodes::VirtualAttribute
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#relation ⇒ Object
Returns the value of attribute relation.
Instance Method Summary collapse
-
#able_to_type_cast? ⇒ Boolean
rubocop:disable Rails/Delegate.
-
#lower ⇒ Object
Create a node for lowering this attribute.
- #type_cast_for_database(value) ⇒ Object
-
#type_caster ⇒ Object
methods from Arel::Nodes::Attribute.
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
15 16 17 |
# File 'lib/active_record/virtual_attributes/virtual_arel.rb', line 15 def name @name end |
#relation ⇒ Object
Returns the value of attribute relation.
15 16 17 |
# File 'lib/active_record/virtual_attributes/virtual_arel.rb', line 15 def relation @relation end |
Instance Method Details
#able_to_type_cast? ⇒ Boolean
rubocop:disable Rails/Delegate
32 33 34 |
# File 'lib/active_record/virtual_attributes/virtual_arel.rb', line 32 def able_to_type_cast? relation.able_to_type_cast? end |
#lower ⇒ Object
Create a node for lowering this attribute
23 24 25 |
# File 'lib/active_record/virtual_attributes/virtual_arel.rb', line 23 def lower relation.lower(self) end |
#type_cast_for_database(value) ⇒ Object
27 28 29 |
# File 'lib/active_record/virtual_attributes/virtual_arel.rb', line 27 def type_cast_for_database(value) relation.type_cast_for_database(name, value) end |
#type_caster ⇒ Object
methods from Arel::Nodes::Attribute
18 19 20 |
# File 'lib/active_record/virtual_attributes/virtual_arel.rb', line 18 def type_caster relation.type_for_attribute(name) end |