Class: Travis::Rollout::ByValue
- Inherits:
-
Struct
- Object
- Struct
- Travis::Rollout::ByValue
- Defined in:
- lib/travis/rollout.rb
Instance Attribute Summary collapse
-
#env ⇒ Object
Returns the value of attribute env.
-
#key ⇒ Object
Returns the value of attribute key.
-
#name ⇒ Object
Returns the value of attribute name.
-
#redis ⇒ Object
Returns the value of attribute redis.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#env ⇒ Object
Returns the value of attribute env
46 47 48 |
# File 'lib/travis/rollout.rb', line 46 def env @env end |
#key ⇒ Object
Returns the value of attribute key
46 47 48 |
# File 'lib/travis/rollout.rb', line 46 def key @key end |
#name ⇒ Object
Returns the value of attribute name
46 47 48 |
# File 'lib/travis/rollout.rb', line 46 def name @name end |
#redis ⇒ Object
Returns the value of attribute redis
46 47 48 |
# File 'lib/travis/rollout.rb', line 46 def redis @redis end |
#value ⇒ Object
Returns the value of attribute value
46 47 48 |
# File 'lib/travis/rollout.rb', line 46 def value @value end |
Instance Method Details
#matches? ⇒ Boolean
47 48 49 |
# File 'lib/travis/rollout.rb', line 47 def matches? !!value && values.include?(value) end |
#values ⇒ Object
51 52 53 54 55 |
# File 'lib/travis/rollout.rb', line 51 def values values = redis.values(key) values = env.values(key) unless values.any? values end |