Class: Flounder::Expression::Cast
- Defined in:
- lib/flounder/expression.rb
Instance Method Summary collapse
-
#initialize(domain, type, expr) ⇒ Cast
constructor
A new instance of Cast.
- #to_sql ⇒ Object
Methods inherited from Expr
#&, #as, #cast, #db_quote, #eval, #to_immediate, #|
Constructor Details
#initialize(domain, type, expr) ⇒ Cast
Returns a new instance of Cast.
53 54 55 56 57 58 |
# File 'lib/flounder/expression.rb', line 53 def initialize domain, type, expr super(domain) @type = type @expr = expr end |
Instance Method Details
#to_sql ⇒ Object
60 61 62 |
# File 'lib/flounder/expression.rb', line 60 def to_sql @expr.to_sql << '::' << @type.to_s end |