Class: MethodStruct::ArgumentParser

Inherits:
Object
  • Object
show all
Defined in:
lib/method_struct/argument_parser.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ ArgumentParser

Returns a new instance of ArgumentParser.



3
4
5
# File 'lib/method_struct/argument_parser.rb', line 3

def initialize(options)
  @options = options
end

Instance Method Details

#callObject



7
8
9
10
11
# File 'lib/method_struct/argument_parser.rb', line 7

def call
  parsed_arguments.tap do |args|
    ArgumentVerifier.new(options.merge(:arguments => args)).call
  end
end