Class: PrePush::ArgsParser
- Inherits:
-
Object
- Object
- PrePush::ArgsParser
- Defined in:
- lib/args_parser.rb
Class Attribute Summary collapse
-
.args_props ⇒ Object
Returns the value of attribute args_props.
Class Method Summary collapse
Class Attribute Details
.args_props ⇒ Object
Returns the value of attribute args_props.
4 5 6 |
# File 'lib/args_parser.rb', line 4 def args_props @args_props end |
Class Method Details
.execute(args) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/args_parser.rb', line 11 def self.execute args result = {:runner => 'nunit262'} return result if args == nil args_props.each_pair do |arg, prop| current_parsed_arg = args.find {|a| a.start_with?("/#{arg}=")} if current_parsed_arg != nil value = current_parsed_arg.sub("/#{arg}=", "") value = value.split(',') if prop[1] == :array result[prop[0]] = value end end result end |