Class: Command::ArgumentDecorator

Inherits:
Object
  • Object
show all
Includes:
DSL::Argument
Defined in:
lib/command-set/arguments.rb

Instance Method Summary collapse

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 embed_argument(arg)
  @wrapped_by.embed_argument(@wrap_with.new(arg))
end