Class: Perpetuity::Postgres::SQLFunction
- Inherits:
-
Object
- Object
- Perpetuity::Postgres::SQLFunction
- Defined in:
- lib/perpetuity/postgres/sql_function.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, *args) ⇒ SQLFunction
constructor
A new instance of SQLFunction.
- #to_s ⇒ Object
Constructor Details
#initialize(name, *args) ⇒ SQLFunction
Returns a new instance of SQLFunction.
5 6 7 8 |
# File 'lib/perpetuity/postgres/sql_function.rb', line 5 def initialize name, *args @name = name @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
4 5 6 |
# File 'lib/perpetuity/postgres/sql_function.rb', line 4 def args @args end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/perpetuity/postgres/sql_function.rb', line 4 def name @name end |
Instance Method Details
#to_s ⇒ Object
10 11 12 |
# File 'lib/perpetuity/postgres/sql_function.rb', line 10 def to_s "#{name}(#{args.join(',')})" end |