Class: GxApi::GenericIdentifier
- Inherits:
-
Object
- Object
- GxApi::GenericIdentifier
- Defined in:
- lib/gxapi/experiment_identifier.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value) ⇒ GenericIdentifier
constructor
Constructor.
-
#to_key ⇒ String
Turn our value into a cache key.
Constructor Details
#initialize(value) ⇒ GenericIdentifier
Constructor
71 72 73 |
# File 'lib/gxapi/experiment_identifier.rb', line 71 def initialize(value) @value = value.to_s end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
65 66 67 |
# File 'lib/gxapi/experiment_identifier.rb', line 65 def value @value end |
Instance Method Details
#to_key ⇒ String
Turn our value into a cache key
79 80 81 |
# File 'lib/gxapi/experiment_identifier.rb', line 79 def to_key self.value.downcase.gsub(/[^\w\d]+/,'_') end |