Class: Unleash::ActivationStrategy
- Inherits:
-
Object
- Object
- Unleash::ActivationStrategy
- Defined in:
- lib/unleash/activation_strategy.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#params ⇒ Object
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(name, params) ⇒ ActivationStrategy
constructor
A new instance of ActivationStrategy.
Constructor Details
#initialize(name, params) ⇒ ActivationStrategy
Returns a new instance of ActivationStrategy.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/unleash/activation_strategy.rb', line 5 def initialize(name, params) self.name = name if params.is_a?(Hash) self.params = params else Unleash.logger.warn "Invalid params provided for ActivationStrategy #{params}" self.params = {} end end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/unleash/activation_strategy.rb', line 3 def name @name end |
#params ⇒ Object
Returns the value of attribute params.
3 4 5 |
# File 'lib/unleash/activation_strategy.rb', line 3 def params @params end |