Class: FromClause
- Defined in:
- lib/activeleopard/query_clauses/from_clause.rb
Instance Attribute Summary collapse
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
Instance Method Summary collapse
- #as_sql ⇒ Object
-
#initialize(table_name) ⇒ FromClause
constructor
A new instance of FromClause.
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_name ⇒ Object (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_sql ⇒ Object
8 9 10 |
# File 'lib/activeleopard/query_clauses/from_clause.rb', line 8 def as_sql "FROM #{table_name}" end |