Class: ActiveRecord::Refined::AST::Column
- Includes:
- Aggregations, 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) ⇒ Object
Methods included from Aggregations
#average, #count, #maximum, #minimum, #sum
Methods included from Arithmetics
Methods included from Predications
#!=, #!~, #<, #<=, #==, #=~, #>, #>=, #between?, #casecmp?, #distinct_from?, #end_with?, #ilike?, #in?, #include?, #intersect?, #like?, #member?, #not_between?, #not_distinct_from?, #not_ilike?, #not_in?, #not_like?, #not_null?, #null?, #start_with?, #subset?, #superset?
Methods inherited from Node
Constructor Details
#initialize(table_name, column_name) ⇒ Column
Returns a new instance of Column.
303 304 305 306 |
# File 'lib/active_record/refined/ast.rb', line 303 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.
301 302 303 |
# File 'lib/active_record/refined/ast.rb', line 301 def column_name @column_name end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
301 302 303 |
# File 'lib/active_record/refined/ast.rb', line 301 def table_name @table_name end |
Instance Method Details
#to_arel(_table) ⇒ Object
308 309 310 |
# File 'lib/active_record/refined/ast.rb', line 308 def to_arel(_table) Arel::Table.new(table_name)[column_name] end |