Class: Flagsmith::Flags::BaseFlag
- Inherits:
-
Object
- Object
- Flagsmith::Flags::BaseFlag
- Includes:
- Comparable
- Defined in:
- lib/flagsmith/sdk/models/flags.rb
Overview
Base data class for the flag entity
Direct Known Subclasses
Instance Attribute Summary collapse
-
#default ⇒ Object
(also: #is_default)
readonly
Returns the value of attribute default.
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #enabled? ⇒ Boolean
-
#initialize(enabled:, value:, default:) ⇒ BaseFlag
constructor
A new instance of BaseFlag.
Constructor Details
#initialize(enabled:, value:, default:) ⇒ BaseFlag
Returns a new instance of BaseFlag.
13 14 15 16 17 |
# File 'lib/flagsmith/sdk/models/flags.rb', line 13 def initialize(enabled:, value:, default:) @enabled = enabled @value = value @default = default end |
Instance Attribute Details
#default ⇒ Object (readonly) Also known as: is_default
Returns the value of attribute default.
11 12 13 |
# File 'lib/flagsmith/sdk/models/flags.rb', line 11 def default @default end |
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
11 12 13 |
# File 'lib/flagsmith/sdk/models/flags.rb', line 11 def enabled @enabled end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
11 12 13 |
# File 'lib/flagsmith/sdk/models/flags.rb', line 11 def value @value end |
Instance Method Details
#enabled? ⇒ Boolean
19 20 21 |
# File 'lib/flagsmith/sdk/models/flags.rb', line 19 def enabled? enabled end |