Class: Ronin::Code::SQL::Statement
- Inherits:
-
Object
- Object
- Ronin::Code::SQL::Statement
- Defined in:
- lib/ronin/code/sql/statement.rb
Overview
Represents a SQL Statement.
Instance Attribute Summary collapse
-
#argument ⇒ Object?
readonly
The statement's argument.
-
#keyword ⇒ Symbol+
readonly
The statement name.
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, #order_by, #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.
68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/ronin/code/sql/statement.rb', line 68 def initialize(keyword,argument=nil,&block) @keyword = keyword @argument = argument if block case block.arity when 0 then instance_eval(&block) else block.call(self) end end end |
Instance Attribute Details
#argument ⇒ Object? (readonly)
The statement's argument.
50 51 52 |
# File 'lib/ronin/code/sql/statement.rb', line 50 def argument @argument end |
#keyword ⇒ Symbol+ (readonly)
The statement name.
45 46 47 |
# File 'lib/ronin/code/sql/statement.rb', line 45 def keyword @keyword end |