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?, #null?, #start_with?

Methods inherited from Node

#as, #asc, #desc

Constructor Details

#initialize(table_name, column_name) ⇒ Column

Returns a new instance of Column.



118
119
120
121
# File 'lib/active_record/refined/ast.rb', line 118

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.



116
117
118
# File 'lib/active_record/refined/ast.rb', line 116

def column_name
  @column_name
end

#table_nameObject (readonly)

Returns the value of attribute table_name.



116
117
118
# File 'lib/active_record/refined/ast.rb', line 116

def table_name
  @table_name
end

Instance Method Details

#to_arel(_table) ⇒ Object



123
124
125
# File 'lib/active_record/refined/ast.rb', line 123

def to_arel(_table)
  Arel::Table.new(table_name)[column_name]
end