Class: ActiveRecord::Refined::AST::Column
- Includes:
- Arithmetics, Predications
- Defined in:
- lib/active_record/refined/ast.rb
Instance Attribute Summary collapse
-
#column_name ⇒ Object
readonly
Returns the value of attribute column_name.
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
Instance Method Summary collapse
-
#initialize(table_name, column_name) ⇒ Column
constructor
A new instance of Column.
- #to_arel(_table, _model) ⇒ Object
Methods included from Arithmetics
#&, #*, #+, #-, #/, #<<, #>>, #^, #|, #~
Methods included from Predications
#!=, #!~, #<, #<=, #==, #=~, #>, #>=, #between?, #bury, #casecmp?, #contains?, #dig, #dig_json, #distinct_from?, #end_with?, #false?, #ilike?, #in?, #include?, #intersect?, #key?, #like?, #member?, #not_between?, #not_distinct_from?, #not_false?, #not_ilike?, #not_in?, #not_like?, #not_null?, #not_true?, #null?, #start_with?, #subset?, #superset?, #true?, #when
Methods inherited from Node
Constructor Details
#initialize(table_name, column_name) ⇒ Column
Returns a new instance of Column.
689 690 691 692 |
# File 'lib/active_record/refined/ast.rb', line 689 def initialize(table_name, column_name) @table_name = table_name @column_name = column_name end |
Instance Attribute Details
#column_name ⇒ Object (readonly)
Returns the value of attribute column_name.
687 688 689 |
# File 'lib/active_record/refined/ast.rb', line 687 def column_name @column_name end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
687 688 689 |
# File 'lib/active_record/refined/ast.rb', line 687 def table_name @table_name end |
Instance Method Details
#to_arel(_table, _model) ⇒ Object
694 695 696 |
# File 'lib/active_record/refined/ast.rb', line 694 def to_arel(_table, _model) Arel::Table.new(table_name)[column_name] end |