Class: Belafonte::Argument::ARGVProcessor::Processor
- Inherits:
-
Object
- Object
- Belafonte::Argument::ARGVProcessor::Processor
- Defined in:
- lib/belafonte/argument/argv_processor/processor.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#occurrences ⇒ Object
readonly
Returns the value of attribute occurrences.
Instance Method Summary collapse
-
#initialize(occurrences, arguments) ⇒ Processor
constructor
A new instance of Processor.
- #processed ⇒ Object
Constructor Details
#initialize(occurrences, arguments) ⇒ Processor
Returns a new instance of Processor.
9 10 11 |
# File 'lib/belafonte/argument/argv_processor/processor.rb', line 9 def initialize(occurrences, arguments) @occurrences, @arguments = occurrences, arguments end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
7 8 9 |
# File 'lib/belafonte/argument/argv_processor/processor.rb', line 7 def arguments @arguments end |
#occurrences ⇒ Object (readonly)
Returns the value of attribute occurrences.
7 8 9 |
# File 'lib/belafonte/argument/argv_processor/processor.rb', line 7 def occurrences @occurrences end |
Instance Method Details
#processed ⇒ Object
13 14 15 16 |
# File 'lib/belafonte/argument/argv_processor/processor.rb', line 13 def processed validate_arguments arguments.first(occurrences) end |