Class: Flagsmith::Flags::BaseFlag
- Inherits:
-
Object
- Object
- Flagsmith::Flags::BaseFlag
- Includes:
- Comparable
- Defined in:
- lib/flagsmith/sdk/models/flags.rb
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.
12 13 14 15 16 |
# File 'lib/flagsmith/sdk/models/flags.rb', line 12 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.
10 11 12 |
# File 'lib/flagsmith/sdk/models/flags.rb', line 10 def default @default end |
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
10 11 12 |
# File 'lib/flagsmith/sdk/models/flags.rb', line 10 def enabled @enabled end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
10 11 12 |
# File 'lib/flagsmith/sdk/models/flags.rb', line 10 def value @value end |
Instance Method Details
#enabled? ⇒ Boolean
18 19 20 |
# File 'lib/flagsmith/sdk/models/flags.rb', line 18 def enabled? enabled end |