Class: ProconBypassMan::ButtonsSettingConfiguration::ParamNormalizer::ButtonList
- Inherits:
-
Object
- Object
- ProconBypassMan::ButtonsSettingConfiguration::ParamNormalizer::ButtonList
- Defined in:
- lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/button_list.rb
Instance Attribute Summary collapse
-
#button ⇒ Object
readonly
Returns the value of attribute button.
Instance Method Summary collapse
-
#initialize(button) ⇒ ButtonList
constructor
A new instance of ButtonList.
- #to_value! ⇒ Array
Constructor Details
#initialize(button) ⇒ ButtonList
Returns a new instance of ButtonList.
7 8 9 |
# File 'lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/button_list.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_list.rb', line 5 def @button end |
Instance Method Details
#to_value! ⇒ Array
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/procon_bypass_man/buttons_setting_configuration/param_normalizer/button_list.rb', line 14 def to_value! case when Integer, TrueClass, FalseClass, NilClass raise UnSupportValueError when Symbol return [] when String return [.to_sym] when Array return .map(&:to_sym).uniq else raise UnexpectedValueError end end |