Module: Predicated
- Included in:
- DMatch::Obj, DMatch::Pred, DMatch::Var
- Defined in:
- lib/destructure/types.rb
Instance Method Summary collapse
Instance Method Details
#test(x, env = nil) ⇒ Object
5 6 7 |
# File 'lib/destructure/types.rb', line 5 def test(x, env=nil) @pred == nil ? true : @pred.call(x, env) end |