Class: Ronin::SQL::Statement
- Inherits:
-
Struct
- Object
- Struct
- Ronin::SQL::Statement
- Defined in:
- lib/ronin/sql/statement.rb
Overview
Represents a SQL Statement.
Instance Attribute Summary collapse
-
#argument ⇒ Object
Returns the value of attribute argument.
-
#keyword ⇒ Object
Returns the value of attribute keyword.
Instance Method Summary collapse
-
#initialize(keyword, argument = nil) {|(statement)| ... } ⇒ Statement
constructor
Initializes a new SQL statement.
Methods included from Emittable
#emitter, #inspect, #to_s, #to_sql
Methods included from Clauses
#clause, #clauses, #default_values, #from, #full_join, #group_by, #having, #indexed_by, #inner_join, #into, #join, #left_join, #limit, #not_indexed, #offset, #on, #right_join, #set, #top, #union, #union_all, #values, #where
Methods included from Operators
#!, #!=, #%, #&, #*, #+, #+@, #-, #-@, #/, #<, #<<, #<=, #==, #>, #>=, #>>, #and, #as, #glob, #in, #is, #is_not, #like, #match, #not, #or, #regexp, #|, #~
Methods included from Literals
Constructor Details
#initialize(keyword, argument = nil) {|(statement)| ... } ⇒ Statement
Initializes a new SQL statement.
59 60 61 62 63 64 65 66 67 68 |
# File 'lib/ronin/sql/statement.rb', line 59 def initialize(keyword,argument=nil,&block) super(keyword,argument) if block case block.arity when 0 then instance_eval(&block) else block.call(self) end end end |
Instance Attribute Details
#argument ⇒ Object
Returns the value of attribute argument
36 37 38 |
# File 'lib/ronin/sql/statement.rb', line 36 def argument @argument end |
#keyword ⇒ Object
Returns the value of attribute keyword
36 37 38 |
# File 'lib/ronin/sql/statement.rb', line 36 def keyword @keyword end |