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.
51 52 53 54 55 |
# File 'lib/sql_mapper.rb', line 51 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.
48 49 50 |
# File 'lib/sql_mapper.rb', line 48 def key @key end |
#result_class ⇒ Object
Returns the value of attribute result_class.
49 50 51 |
# File 'lib/sql_mapper.rb', line 49 def result_class @result_class end |
#sql ⇒ Object
Returns the value of attribute sql.
49 50 51 |
# File 'lib/sql_mapper.rb', line 49 def sql @sql end |