Class: ActiveRecord::SqlMapper::QueryMapping
- Inherits:
-
Object
- Object
- ActiveRecord::SqlMapper::QueryMapping
- Defined in:
- lib/sql_mapper.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#result_class ⇒ Object
Returns the value of attribute result_class.
-
#sql ⇒ Object
Returns the value of attribute sql.
Instance Method Summary collapse
-
#initialize(key, sql, result_class = nil) ⇒ QueryMapping
constructor
A new instance of QueryMapping.
Constructor Details
#initialize(key, sql, result_class = nil) ⇒ QueryMapping
Returns a new instance of QueryMapping.
33 34 35 36 37 |
# File 'lib/sql_mapper.rb', line 33 def initialize(key, sql, result_class=nil) @key = key @sql = sql @result_class = result_class end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
30 31 32 |
# File 'lib/sql_mapper.rb', line 30 def key @key end |
#result_class ⇒ Object
Returns the value of attribute result_class.
31 32 33 |
# File 'lib/sql_mapper.rb', line 31 def result_class @result_class end |
#sql ⇒ Object
Returns the value of attribute sql.
31 32 33 |
# File 'lib/sql_mapper.rb', line 31 def sql @sql end |