Class: ActiveRecord::SqlMapper::QueryMapping

Inherits:
Object
  • Object
show all
Defined in:
lib/sql_mapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#keyObject (readonly)

Returns the value of attribute key.



48
49
50
# File 'lib/sql_mapper.rb', line 48

def key
  @key
end

#result_classObject

Returns the value of attribute result_class.



49
50
51
# File 'lib/sql_mapper.rb', line 49

def result_class
  @result_class
end

#sqlObject

Returns the value of attribute sql.



49
50
51
# File 'lib/sql_mapper.rb', line 49

def sql
  @sql
end