Class: FunctionObject::ArgumentsBuilder
- Inherits:
-
Object
- Object
- FunctionObject::ArgumentsBuilder
- Defined in:
- lib/function_object/arguments_builder.rb
Defined Under Namespace
Classes: Descriptor
Instance Method Summary collapse
Instance Method Details
#argument(name, options = {}) ⇒ Object Also known as: arg
21 22 23 24 |
# File 'lib/function_object/arguments_builder.rb', line 21 def argument(name, = {}) default = [:default] @descriptors << Descriptor.new(name, default, ) end |
#build(&block) ⇒ Object
15 16 17 18 19 |
# File 'lib/function_object/arguments_builder.rb', line 15 def build(&block) @descriptors = [] instance_exec(&block) @descriptors end |