Class: Hackle::ExperimentStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/hackle/internal/model/experiment.rb

Constant Summary collapse

DRAFT =
new('DRAFT')
RUNNING =
new('RUNNING')
PAUSED =
new('PAUSED')
COMPLETED =
new('COMPLETED')

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ ExperimentStatus

Returns a new instance of ExperimentStatus.

Parameters:

  • name (String)


163
164
165
# File 'lib/hackle/internal/model/experiment.rb', line 163

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



160
161
162
# File 'lib/hackle/internal/model/experiment.rb', line 160

def name
  @name
end

Class Method Details

.from_or_nil(name) ⇒ ExperimentStatus?

Parameters:

  • name (String)

Returns:



185
186
187
# File 'lib/hackle/internal/model/experiment.rb', line 185

def self.from_or_nil(name)
  @types[name.upcase]
end

.valuesArray<ExperimentStatus>

Returns:



190
191
192
# File 'lib/hackle/internal/model/experiment.rb', line 190

def self.values
  @types.values
end

Instance Method Details

#to_sObject



167
168
169
# File 'lib/hackle/internal/model/experiment.rb', line 167

def to_s
  name
end