Class: Command::ArgumentDecoration

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

Direct Known Subclasses

Named, Optional, Repeating, Repeating::Omittable

Instance Attribute Summary

Attributes inherited from Argument

#name

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Argument

#basis, #check_present, #complete, #consume, #consume_hash, #match_terms, #names, #omittable?, #parse, #required?, #subject_requirements, #validate

Constructor Details

#initialize(down) ⇒ ArgumentDecoration

Returns a new instance of ArgumentDecoration.



148
149
150
# File 'lib/command-set/arguments.rb', line 148

def initialize(down)
  @decorated = down
end

Class Method Details

.register(name) ⇒ Object Also known as: register_as



130
131
132
# File 'lib/command-set/arguments.rb', line 130

def register(name)
  DSL::Argument::register_decorator(self, name)
end

Instance Method Details

#decoratedObject



152
153
154
# File 'lib/command-set/arguments.rb', line 152

def decorated
  @decorated
end

#pretty_print_instance_variablesObject



144
145
146
# File 'lib/command-set/arguments.rb', line 144

def pretty_print_instance_variables
  ["@decorated"]
end