Sha256: 21507f9123a047d61f89095b200c3e8665722487df4157d937e6125f1cc25f99

Contents?: true

Size: 674 Bytes

Versions: 21

Compression:

Stored size: 674 Bytes

Contents

module ProconBypassMan
  class ButtonsSettingConfiguration
    module ParamNormalizer
      class ForceNeutral
        attr_reader :force_neutral

        def initialize(force_neutral)
          @force_neutral = force_neutral
        end

        def to_value!
          case force_neutral
          when Integer, TrueClass
            raise UnSupportValueError
          when Symbol, String
            return [force_neutral.to_sym]
          when Array
            return force_neutral.map(&:to_sym).uniq
          when FalseClass, NilClass
            return nil
          else
            raise UnexpectedValueError
          end
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
procon_bypass_man-0.3.12 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.3.11 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.3.10 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.3.9 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.3.8.1 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.3.8 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.3.7 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.3.6 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.3.5 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.3.4 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.3.3.1 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.3.3 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.3.2 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.3.1 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.3.0 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.2.3 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.2.2 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.2.1 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.2.0 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb
procon_bypass_man-0.1.23 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/force_neutral.rb