Class: ActiveRecord::Refined::AST::Column
- Includes:
- 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 Predications
#!=, #!~, #<, #<=, #==, #=~, #>, #>=, #between?, #end_with?, #in?, #include?, #like?, #member?, #null?, #start_with?
Methods inherited from Node
Constructor Details
#initialize(table_name, column_name) ⇒ Column
Returns a new instance of Column.
137 138 139 140 |
# File 'lib/active_record/refined/ast.rb', line 137 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.
135 136 137 |
# File 'lib/active_record/refined/ast.rb', line 135 def column_name @column_name end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
135 136 137 |
# File 'lib/active_record/refined/ast.rb', line 135 def table_name @table_name end |
Instance Method Details
#to_arel(_table) ⇒ Object
142 143 144 |
# File 'lib/active_record/refined/ast.rb', line 142 def to_arel(_table) Arel::Table.new(table_name)[column_name] end |