Method: Ronin::SQL::StatementList#statement

Defined in:
lib/ronin/sql/statement_list.rb

#statement(keyword, argument = nil) {|(statement)| ... } ⇒ Statement

Appends an arbitrary statement.

Yields:

  • ((statement))

    If a block is given, it will be called.

Yield Parameters:

  • statement (Statement)

    If the block accepts an argument, it will be passed the new statement. Otherwise the block will be evaluated within the statement.

Parameters:

  • Name of the statement.

  • (defaults to: nil)

    Additional argument for the statement.

Returns:

  • The newly created statement.

API:

  • public



103
104
105
106
107
108
# File 'lib/ronin/sql/statement_list.rb', line 103

def statement(keyword,argument=nil,&block)
  new_statement = super

  self << new_statement
  return new_statement
end