Class: ProconBypassMan::ButtonsSettingConfiguration::ParamNormalizer::Button
- Inherits:
-
Object
- Object
- ProconBypassMan::ButtonsSettingConfiguration::ParamNormalizer::Button
- Defined in:
- lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/button.rb
Instance Attribute Summary collapse
-
#button ⇒ Object
readonly
Returns the value of attribute button.
Instance Method Summary collapse
-
#initialize(button) ⇒ Button
constructor
A new instance of Button.
- #to_value! ⇒ Object
Constructor Details
#initialize(button) ⇒ Button
Returns a new instance of Button.
7 8 9 |
# File 'lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/button.rb', line 7 def initialize() @button = end |
Instance Attribute Details
#button ⇒ Object (readonly)
Returns the value of attribute button.
5 6 7 |
# File 'lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/button.rb', line 5 def @button end |
Instance Method Details
#to_value! ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/button.rb', line 11 def to_value! case when TrueClass, FalseClass, NilClass, Array, Integer raise UnSupportValueError when Symbol, String unless !!ProconBypassMan::Procon::ButtonCollection::BUTTONS_MAP[.to_sym] raise UnexpectedValueError end return .to_sym else raise UnexpectedValueError end end |