Class: Flipper::Key
- Inherits:
-
Object
- Object
- Flipper::Key
- Defined in:
- lib/flipper/key.rb
Overview
Private: Used internally in flipper to create key to be used for feature in the adapter. You should never need to use this.
Constant Summary collapse
- Separator =
Private
'/'
Instance Attribute Summary collapse
-
#feature_name ⇒ Object
readonly
Private.
-
#gate_key ⇒ Object
readonly
Private.
Instance Method Summary collapse
-
#initialize(feature_name, gate_key) ⇒ Key
constructor
Internal.
-
#inspect ⇒ Object
Internal: Pretty string version for debugging.
-
#separator ⇒ Object
Private.
-
#to_s ⇒ Object
Private.
Constructor Details
#initialize(feature_name, gate_key) ⇒ Key
Internal
15 16 17 |
# File 'lib/flipper/key.rb', line 15 def initialize(feature_name, gate_key) @feature_name, @gate_key = feature_name, gate_key end |
Instance Attribute Details
#feature_name ⇒ Object (readonly)
Private
9 10 11 |
# File 'lib/flipper/key.rb', line 9 def feature_name @feature_name end |
#gate_key ⇒ Object (readonly)
Private
12 13 14 |
# File 'lib/flipper/key.rb', line 12 def gate_key @gate_key end |
Instance Method Details
#inspect ⇒ Object
Internal: Pretty string version for debugging.
30 31 32 33 34 35 36 |
# File 'lib/flipper/key.rb', line 30 def inspect attributes = [ "feature_name=#{feature_name.inspect}", "gate_key=#{gate_key.inspect}", ] "#<#{self.class.name}:#{object_id} #{attributes.join(', ')}>" end |
#separator ⇒ Object
Private
20 21 22 |
# File 'lib/flipper/key.rb', line 20 def separator Separator.dup end |
#to_s ⇒ Object
Private
25 26 27 |
# File 'lib/flipper/key.rb', line 25 def to_s "#{feature_name}#{separator}#{gate_key}" end |