Class: Fabulator::Expr::DivExpr
- Defined in:
- lib/fabulator/expr/bin_expr.rb
Instance Method Summary collapse
Methods inherited from BinExpr
#expr_type, #initialize, #result_type, #run
Constructor Details
This class inherits a constructor from Fabulator::Expr::BinExpr
Instance Method Details
#calculate(a, b) ⇒ Object
137 138 139 140 |
# File 'lib/fabulator/expr/bin_expr.rb', line 137 def calculate(a,b) return nil if b.nil? || a.nil? a / b end |
#op ⇒ Object
133 134 135 |
# File 'lib/fabulator/expr/bin_expr.rb', line 133 def op :div end |