Class: Flipper::Api::V1::Decorators::Actor
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Flipper::Api::V1::Decorators::Actor
- Defined in:
- lib/flipper/api/v1/decorators/actor.rb
Instance Attribute Summary collapse
-
#actor ⇒ Object
readonly
Public: the actor and features.
-
#features ⇒ Object
readonly
Public: the actor and features.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(actor, features) ⇒ Actor
constructor
A new instance of Actor.
Constructor Details
#initialize(actor, features) ⇒ Actor
Returns a new instance of Actor.
11 12 13 14 |
# File 'lib/flipper/api/v1/decorators/actor.rb', line 11 def initialize(actor, features) @actor = actor @features = features end |
Instance Attribute Details
#actor ⇒ Object (readonly)
Public: the actor and features.
9 10 11 |
# File 'lib/flipper/api/v1/decorators/actor.rb', line 9 def actor @actor end |
#features ⇒ Object (readonly)
Public: the actor and features.
9 10 11 |
# File 'lib/flipper/api/v1/decorators/actor.rb', line 9 def features @features end |
Instance Method Details
#as_json ⇒ Object
16 17 18 19 20 21 |
# File 'lib/flipper/api/v1/decorators/actor.rb', line 16 def as_json { 'flipper_id' => actor.flipper_id, 'features' => features_data, } end |