Class: ConvenientService::Config::Entities::Option
- Inherits:
-
Object
- Object
- ConvenientService::Config::Entities::Option
- Defined in:
- lib/convenient_service/config/entities/option.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Boolean?
- #enabled? ⇒ Boolean
- #initialize(name:, enabled: false, **data) ⇒ void constructor
Constructor Details
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
22 23 24 |
# File 'lib/convenient_service/config/entities/option.rb', line 22 def data @data end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
16 17 18 |
# File 'lib/convenient_service/config/entities/option.rb', line 16 def name @name end |
Instance Method Details
#==(other) ⇒ Boolean?
50 51 52 53 54 55 56 57 58 |
# File 'lib/convenient_service/config/entities/option.rb', line 50 def ==(other) return unless other.instance_of?(self.class) return false if name != other.name return false if enabled != other.enabled return false if data != other.data true end |
#enabled? ⇒ Boolean
39 40 41 |
# File 'lib/convenient_service/config/entities/option.rb', line 39 def enabled? enabled end |