Class: Command::ArgumentDecorator
- Inherits:
-
Object
- Object
- Command::ArgumentDecorator
- Includes:
- DSL::Argument
- Defined in:
- lib/command-set/arguments.rb
Instance Method Summary collapse
- #embed_argument(arg) ⇒ Object
-
#initialize(wrapped_by, wrap_with, &block) ⇒ ArgumentDecorator
constructor
A new instance of ArgumentDecorator.
Methods included from DSL::Argument
#alternating_argument, #argument, argument_typemap, #create, #create_decorator, document, #named_optionals, register_argument, register_decorator, #special_argument, #subject
Constructor Details
#initialize(wrapped_by, wrap_with, &block) ⇒ ArgumentDecorator
Returns a new instance of ArgumentDecorator.
118 119 120 121 |
# File 'lib/command-set/arguments.rb', line 118 def initialize(wrapped_by, wrap_with, &block) @wrapped_by = wrapped_by @wrap_with = wrap_with end |
Instance Method Details
#embed_argument(arg) ⇒ Object
123 124 125 |
# File 'lib/command-set/arguments.rb', line 123 def (arg) @wrapped_by.(@wrap_with.new(arg)) end |