spec/support/models/dummy_options_parser.rb in sinclair-1.1.1 vs spec/support/models/dummy_options_parser.rb in sinclair-1.1.2

- old
+ new

@@ -1,19 +1,23 @@ +# frozen_string_literal: true + class Sinclair - class OptionsParser::Dummy - include OptionsParser + module OptionsParser + class Dummy + include OptionsParser - def initialize(options) - @options = options.deep_dup - end + def initialize(options) + @options = options.deep_dup + end - def the_method - return 'missing option' if options_object.switch.nil? + def the_method + return 'missing option' if options_object.switch.nil? - if options_object.switch - "The value is #{options_object.option_1}" - else - "The value is not #{options_object.option_1} but #{options_object.option_2}" + if options_object.switch + "The value is #{options_object.option_1}" + else + "The value is not #{options_object.option_1} but #{options_object.option_2}" + end end end end end