Sha256: f648f9512e8191067db0ba3d5e3ddf8745cf3c54fe5a59888db71b1c6fafc37e

Contents?: true

Size: 672 Bytes

Versions: 21

Compression:

Stored size: 672 Bytes

Contents

module ProconBypassMan
  class ButtonsSettingConfiguration
    module ParamNormalizer
      class DisableMacroIfPressed
        attr_reader :value

        def initialize(value)
          @value = value
        end

        def to_value!
          case value
          when FalseClass, Integer, TrueClass
            raise UnSupportValueError
          when Symbol, String
            return [value.to_sym]
          when Array
            return value.map(&:to_sym).uniq
          when NilClass # 常に対象のmacroをdisableにする
            return [true]
          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/disable_macro_if_pressed.rb
procon_bypass_man-0.3.11 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb
procon_bypass_man-0.3.10 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb
procon_bypass_man-0.3.9 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb
procon_bypass_man-0.3.8.1 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb
procon_bypass_man-0.3.8 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb
procon_bypass_man-0.3.7 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb
procon_bypass_man-0.3.6 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb
procon_bypass_man-0.3.5 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb
procon_bypass_man-0.3.4 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb
procon_bypass_man-0.3.3.1 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb
procon_bypass_man-0.3.3 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb
procon_bypass_man-0.3.2 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb
procon_bypass_man-0.3.1 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb
procon_bypass_man-0.3.0 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb
procon_bypass_man-0.2.3 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb
procon_bypass_man-0.2.2 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb
procon_bypass_man-0.2.1 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb
procon_bypass_man-0.2.0 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb
procon_bypass_man-0.1.23 lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/disable_macro_if_pressed.rb