Class: Arel::Attributes::Attribute
- Inherits:
-
Struct
- Object
- Struct
- Arel::Attributes::Attribute
- Includes:
- Arel::AliasPredication, Expressions, Math, OrderPredications, Predications
- Defined in:
- lib/arel/attributes/attribute.rb
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
-
#lower ⇒ Object
Create a node for lowering this attribute.
- #type_cast_for_database(value) ⇒ Object
- #type_caster ⇒ Object
Methods included from Math
#&, #*, #+, #-, #/, #<<, #>>, #^, #|, #~@
Methods included from OrderPredications
Methods included from Arel::AliasPredication
Methods included from Predications
#between, #concat, #contains, #does_not_match, #does_not_match_all, #does_not_match_any, #does_not_match_regexp, #eq, #eq_all, #eq_any, #gt, #gt_all, #gt_any, #gteq, #gteq_all, #gteq_any, #in, #in_all, #in_any, #is_distinct_from, #is_not_distinct_from, #lt, #lt_all, #lt_any, #lteq, #lteq_all, #lteq_any, #matches, #matches_all, #matches_any, #matches_regexp, #not_between, #not_eq, #not_eq_all, #not_eq_any, #not_in, #not_in_all, #not_in_any, #overlaps, #quoted_array, #when
Methods included from Expressions
#average, #count, #extract, #maximum, #minimum, #sum
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
5 6 7 |
# File 'lib/arel/attributes/attribute.rb', line 5 def name @name end |
#relation ⇒ Object
Returns the value of attribute relation
5 6 7 |
# File 'lib/arel/attributes/attribute.rb', line 5 def relation @relation end |
Instance Method Details
#able_to_type_cast? ⇒ Boolean
26 27 28 |
# File 'lib/arel/attributes/attribute.rb', line 26 def able_to_type_cast? relation.able_to_type_cast? end |
#lower ⇒ Object
Create a node for lowering this attribute
18 19 20 |
# File 'lib/arel/attributes/attribute.rb', line 18 def lower relation.lower self end |
#type_cast_for_database(value) ⇒ Object
22 23 24 |
# File 'lib/arel/attributes/attribute.rb', line 22 def type_cast_for_database(value) relation.type_cast_for_database(name, value) end |
#type_caster ⇒ Object
12 13 14 |
# File 'lib/arel/attributes/attribute.rb', line 12 def type_caster relation.type_for_attribute(name) end |