lib/travis/cli/parser.rb in travis-1.0.3 vs lib/travis/cli/parser.rb in travis-1.1.0

- old
+ new

@@ -16,12 +16,12 @@ def on(*args, &block) block ||= begin full_arg = args.detect { |a| a.start_with? '--' } name = full_arg.gsub(/^--(\[no-\])?(\S+).*$/, '\2').gsub('-', '_') - attr_reader(name) unless method_defined? name - attr_writer(name) unless method_defined? "#{name}=" - alias_method("#{name}?", name) if full_arg.start_with? '--[no-]' and not method_defined? "#{name}?" + attr_reader(name) unless method_defined? name + attr_writer(name) unless method_defined? "#{name}=" + alias_method("#{name}?", name) unless method_defined? "#{name}?" proc { |instance, value| instance.public_send("#{name}=", value) } end on_initialize do |instance| instance.parser.on(*args) do |value|