Class: ActiveRecord::Refined::AST::Column

Inherits:
Node
  • Object
show all
Includes:
Predications
Defined in:
lib/active_record/refined/ast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Predications

#!=, #!~, #<, #<=, #==, #=~, #>, #>=, #between?, #end_with?, #in?, #include?, #like?, #member?, #null?, #start_with?

Methods inherited from Node

#as, #asc, #desc

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_nameObject (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_nameObject (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