Class: FromClause

Inherits:
Object show all
Defined in:
lib/activeleopard/query_clauses/from_clause.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(table_name) ⇒ FromClause

Returns a new instance of FromClause.



4
5
6
# File 'lib/activeleopard/query_clauses/from_clause.rb', line 4

def initialize(table_name)
  @table_name = table_name
end

Instance Attribute Details

#table_nameObject (readonly)

Returns the value of attribute table_name.



2
3
4
# File 'lib/activeleopard/query_clauses/from_clause.rb', line 2

def table_name
  @table_name
end

Instance Method Details

#as_sqlObject



8
9
10
# File 'lib/activeleopard/query_clauses/from_clause.rb', line 8

def as_sql
  "FROM #{table_name}"
end