Class: Flagsmith::Engine::Organisation
- Inherits:
-
Object
- Object
- Flagsmith::Engine::Organisation
- Defined in:
- lib/flagsmith/engine/organisations/models.rb
Overview
OrganisationModel
Instance Attribute Summary collapse
-
#feature_analitycs ⇒ Object
readonly
Returns the value of attribute feature_analitycs.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#persist_trait_data ⇒ Object
readonly
Returns the value of attribute persist_trait_data.
-
#stop_serving_flags ⇒ Object
readonly
Returns the value of attribute stop_serving_flags.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, name:, stop_serving_flags:, persist_trait_data:, feature_analitycs: nil) ⇒ Organisation
constructor
A new instance of Organisation.
- #unique_slug ⇒ Object
Constructor Details
#initialize(id:, name:, stop_serving_flags:, persist_trait_data:, feature_analitycs: nil) ⇒ Organisation
Returns a new instance of Organisation.
9 10 11 12 13 14 15 |
# File 'lib/flagsmith/engine/organisations/models.rb', line 9 def initialize(id:, name:, stop_serving_flags:, persist_trait_data:, feature_analitycs: nil) @id = id @name = name @feature_analitycs = feature_analitycs @stop_serving_flags = stop_serving_flags @persist_trait_data = persist_trait_data end |
Instance Attribute Details
#feature_analitycs ⇒ Object (readonly)
Returns the value of attribute feature_analitycs.
7 8 9 |
# File 'lib/flagsmith/engine/organisations/models.rb', line 7 def feature_analitycs @feature_analitycs end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/flagsmith/engine/organisations/models.rb', line 7 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/flagsmith/engine/organisations/models.rb', line 7 def name @name end |
#persist_trait_data ⇒ Object (readonly)
Returns the value of attribute persist_trait_data.
7 8 9 |
# File 'lib/flagsmith/engine/organisations/models.rb', line 7 def persist_trait_data @persist_trait_data end |
#stop_serving_flags ⇒ Object (readonly)
Returns the value of attribute stop_serving_flags.
7 8 9 |
# File 'lib/flagsmith/engine/organisations/models.rb', line 7 def stop_serving_flags @stop_serving_flags end |
Class Method Details
.build(json) ⇒ Object
22 23 24 |
# File 'lib/flagsmith/engine/organisations/models.rb', line 22 def build(json) new(**json.slice(:id, :name, :feature_analitycs, :stop_serving_flags, :persist_trait_data)) end |
Instance Method Details
#unique_slug ⇒ Object
17 18 19 |
# File 'lib/flagsmith/engine/organisations/models.rb', line 17 def unique_slug "#{id}-#{name}" end |