Class: Qdsl::TableQuery
- Inherits:
-
Object
- Object
- Qdsl::TableQuery
- Defined in:
- lib/table_query.rb
Instance Attribute Summary collapse
-
#column_names ⇒ Object
readonly
Returns the value of attribute column_names.
Instance Method Summary collapse
-
#initialize(name, column_names) ⇒ TableQuery
constructor
A new instance of TableQuery.
- #render(context, depth, id) ⇒ Object
Constructor Details
#initialize(name, column_names) ⇒ TableQuery
Returns a new instance of TableQuery.
5 6 7 8 |
# File 'lib/table_query.rb', line 5 def initialize(name, column_names) @name = name @column_names = column_names end |
Instance Attribute Details
#column_names ⇒ Object (readonly)
Returns the value of attribute column_names.
3 4 5 |
# File 'lib/table_query.rb', line 3 def column_names @column_names end |
Instance Method Details
#render(context, depth, id) ⇒ Object
10 11 12 |
# File 'lib/table_query.rb', line 10 def render(context, depth, id) "#{@name} AS #{id}" end |