Class: Alchemy::Configuration::BaseOption
- Inherits:
-
Object
- Object
- Alchemy::Configuration::BaseOption
- Defined in:
- lib/alchemy/configuration/base_option.rb
Direct Known Subclasses
BooleanOption, ClassOption, ClassSetOption, IntegerOption, ListOption, RegexpOption, StringOption
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value:, name:, **args) ⇒ BaseOption
constructor
A new instance of BaseOption.
Constructor Details
#initialize(value:, name:, **args) ⇒ BaseOption
Returns a new instance of BaseOption.
10 11 12 13 |
# File 'lib/alchemy/configuration/base_option.rb', line 10 def initialize(value:, name:, **args) @name = name @value = validate(value) unless value.nil? end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
14 15 16 |
# File 'lib/alchemy/configuration/base_option.rb', line 14 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
14 15 16 |
# File 'lib/alchemy/configuration/base_option.rb', line 14 def value @value end |
Class Method Details
.value_class ⇒ Object
6 7 8 |
# File 'lib/alchemy/configuration/base_option.rb', line 6 def self.value_class raise NotImplementedError end |