Class: Val
- Inherits:
-
Object
- Object
- Val
- Defined in:
- lib/val.rb
Constant Summary collapse
- OR =
-> *values do -> value do values.any? &[:===, value] end end
- Bool =
new { OR[true, false] }
Instance Method Summary collapse
- #===(value) ⇒ Object
-
#initialize(&block) ⇒ Val
constructor
A new instance of Val.
- #OR(*all) ⇒ Object
Constructor Details
#initialize(&block) ⇒ Val
Returns a new instance of Val.
16 17 18 |
# File 'lib/val.rb', line 16 def initialize &block @type = instance_exec &block end |