Class: Hackle::ExperimentType
- Inherits:
-
Object
- Object
- Hackle::ExperimentType
- Defined in:
- lib/hackle/internal/model/experiment.rb
Constant Summary collapse
- AB_TEST =
new('AB_TEST')
- FEATURE_FLAG =
new('FEATURE_FLAG')
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name) ⇒ ExperimentType
constructor
A new instance of ExperimentType.
- #to_s ⇒ Object
Constructor Details
#initialize(name) ⇒ ExperimentType
Returns a new instance of ExperimentType.
129 130 131 |
# File 'lib/hackle/internal/model/experiment.rb', line 129 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
126 127 128 |
# File 'lib/hackle/internal/model/experiment.rb', line 126 def name @name end |
Class Method Details
.from_or_nil(name) ⇒ ExperimentType?
147 148 149 |
# File 'lib/hackle/internal/model/experiment.rb', line 147 def self.from_or_nil(name) @types[name.upcase] end |
.values ⇒ Array<ExperimentType>
152 153 154 |
# File 'lib/hackle/internal/model/experiment.rb', line 152 def self.values @types.values end |
Instance Method Details
#to_s ⇒ Object
133 134 135 |
# File 'lib/hackle/internal/model/experiment.rb', line 133 def to_s name end |