Class: Flagsmith::Flags::BaseFlag

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/flagsmith/sdk/models/flags.rb

Overview

Base data class for the flag entity

Direct Known Subclasses

DefaultFlag, Flag

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#defaultObject (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

#enabledObject (readonly)

Returns the value of attribute enabled.



11
12
13
# File 'lib/flagsmith/sdk/models/flags.rb', line 11

def enabled
  @enabled
end

#valueObject (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

Returns:

  • (Boolean)


19
20
21
# File 'lib/flagsmith/sdk/models/flags.rb', line 19

def enabled?
  enabled
end