lib/clamp/command.rb in clamp-0.6.0 vs lib/clamp/command.rb in clamp-0.6.1
- old
+ new
@@ -26,11 +26,11 @@
#
def initialize(invocation_path, context = {}, parent_attribute_values = {})
@invocation_path = invocation_path
@context = context
parent_attribute_values.each do |attribute, value|
- instance_variable_set(attribute.ivar_name, value)
+ attribute.of(self).set(value)
end
end
# @return [String] the path used to invoke this command
#
@@ -47,12 +47,10 @@
# @param [Array<String>] arguments command-line arguments
# @return [Array<String>] unconsumed arguments
#
def parse(arguments)
@remaining_arguments = arguments.dup
- parse_environment_options
parse_options
- parse_environment_parameters
parse_parameters
parse_subcommand
handle_remaining_arguments
end