Class: Ronin::Code::SQL::Function
- Defined in:
- lib/ronin/code/sql/function.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Fields passed to the function.
-
#name ⇒ Object
readonly
Name of the function.
Instance Method Summary collapse
- #emit ⇒ Object
-
#initialize(name, *fields) ⇒ Function
constructor
A new instance of Function.
Methods inherited from Expr
Constructor Details
#initialize(name, *fields) ⇒ Function
Returns a new instance of Function.
35 36 37 38 |
# File 'lib/ronin/code/sql/function.rb', line 35 def initialize(name,*fields) @name = name @fields = fields end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Fields passed to the function
33 34 35 |
# File 'lib/ronin/code/sql/function.rb', line 33 def fields @fields end |
#name ⇒ Object (readonly)
Name of the function
30 31 32 |
# File 'lib/ronin/code/sql/function.rb', line 30 def name @name end |
Instance Method Details
#emit ⇒ Object
40 41 42 43 44 45 46 47 48 |
# File 'lib/ronin/code/sql/function.rb', line 40 def emit tokens = emit_token(@name) tokens << Token.open_paren tokens += emit_list(@fields) tokens << Token.close_paren return tokens end |