Class: Ronin::Code::SQL::Delete
- Defined in:
- lib/ronin/code/sql/delete.rb
Instance Attribute Summary
Attributes inherited from Statement
Instance Method Summary collapse
- #emit ⇒ Object
-
#initialize(dialect, table = nil, options = {}, &block) ⇒ Delete
constructor
A new instance of Delete.
- #table(name = nil) ⇒ Object
Methods inherited from Statement
clause_order, clauses, #get_clause, #has_clause?, has_clause?
Methods inherited from Expr
Constructor Details
#initialize(dialect, table = nil, options = {}, &block) ⇒ Delete
Returns a new instance of Delete.
34 35 36 37 38 |
# File 'lib/ronin/code/sql/delete.rb', line 34 def initialize(dialect,table=nil,={},&block) @table = table super(dialect,,&block) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Ronin::Code::SQL::Statement
Instance Method Details
#emit ⇒ Object
45 46 47 |
# File 'lib/ronin/code/sql/delete.rb', line 45 def emit emit_token('DELETE FROM') + emit_value(@table) end |
#table(name = nil) ⇒ Object
40 41 42 43 |
# File 'lib/ronin/code/sql/delete.rb', line 40 def table(name=nil) @table = name if name return @table end |