Class: DB::Model::Statement::Multiple
- Inherits:
-
Object
- Object
- DB::Model::Statement::Multiple
- Defined in:
- lib/db/model/statement/multiple.rb
Instance Method Summary collapse
- #append_to(statement) ⇒ Object
-
#initialize(things) ⇒ Multiple
constructor
A new instance of Multiple.
Constructor Details
#initialize(things) ⇒ Multiple
Returns a new instance of Multiple.
27 28 29 |
# File 'lib/db/model/statement/multiple.rb', line 27 def initialize(things) @things = things end |
Instance Method Details
#append_to(statement) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/db/model/statement/multiple.rb', line 31 def append_to(statement) first = true @things.each do |thing| statement.clause(",") unless first first = false thing.append_to(statement) end return statement end |