Module: Typ::DSL
- Defined in:
- lib/typ.rb
Instance Method Summary collapse
Instance Method Details
#gates ⇒ Object
19 20 21 |
# File 'lib/typ.rb', line 19 def gates @gates ||= [] end |
#is(type) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/typ.rb', line 23 def is type case type when Array gates << Is::Array.new(type) when Class if type.include? Typ gates << type else fail "don't know how to create a Gate from #{type}" end else fail "don't know how to create a Gate from #{type}" end end |