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.
10 11 12 |
# File 'lib/db/model/statement/multiple.rb', line 10 def initialize(things) @things = things end |
Instance Method Details
#append_to(statement) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/db/model/statement/multiple.rb', line 14 def append_to(statement) first = true @things.each do |thing| statement.clause(",") unless first first = false thing.append_to(statement) end return statement end |