Module: Type::Definition::ClassMethods
- Defined in:
- lib/type/definition.rb
Instance Method Summary collapse
-
#generate(name = nil, &block) ⇒ Type::Definition, Type::Definition::Proxy
~~~ ruby Type::scalar(:Int32).from(:Integer) do int32_range = (-1 << 31) …
Instance Method Details
#generate(name, &block) ⇒ Type::Definition #generate(name) ⇒ Type::Definition::Proxy
54 55 56 57 |
# File 'lib/type/definition.rb', line 54 def generate(name = nil, &block) return new(name, &block) if block_given? Proxy.new(name, self) end |