Class: Flipper::Actor
- Inherits:
-
Object
- Object
- Flipper::Actor
- Defined in:
- lib/flipper/actor.rb
Instance Attribute Summary collapse
-
#flipper_id ⇒ Object
readonly
Returns the value of attribute flipper_id.
-
#flipper_properties ⇒ Object
readonly
Returns the value of attribute flipper_properties.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize(flipper_id, flipper_properties = {}) ⇒ Actor
constructor
A new instance of Actor.
Constructor Details
#initialize(flipper_id, flipper_properties = {}) ⇒ Actor
Returns a new instance of Actor.
7 8 9 10 |
# File 'lib/flipper/actor.rb', line 7 def initialize(flipper_id, flipper_properties = {}) @flipper_id = flipper_id @flipper_properties = flipper_properties end |
Instance Attribute Details
#flipper_id ⇒ Object (readonly)
Returns the value of attribute flipper_id.
5 6 7 |
# File 'lib/flipper/actor.rb', line 5 def flipper_id @flipper_id end |
#flipper_properties ⇒ Object (readonly)
Returns the value of attribute flipper_properties.
5 6 7 |
# File 'lib/flipper/actor.rb', line 5 def flipper_properties @flipper_properties end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
12 13 14 15 16 |
# File 'lib/flipper/actor.rb', line 12 def eql?(other) self.class.eql?(other.class) && @flipper_id == other.flipper_id && @flipper_properties == other.flipper_properties end |
#hash ⇒ Object
19 20 21 |
# File 'lib/flipper/actor.rb', line 19 def hash flipper_id.hash end |