Class: ExperimentVariant
- Inherits:
-
Object
- Object
- ExperimentVariant
- Defined in:
- lib/json/experiment_variant.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #==(o) ⇒ Object
- #hash_code ⇒ Object
-
#initialize(name = nil, config) ⇒ ExperimentVariant
constructor
A new instance of ExperimentVariant.
- #to_s ⇒ Object
Constructor Details
#initialize(name = nil, config) ⇒ ExperimentVariant
Returns a new instance of ExperimentVariant.
6 7 8 9 |
# File 'lib/json/experiment_variant.rb', line 6 def initialize(name = nil, config) @name = name @config = config end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
4 5 6 |
# File 'lib/json/experiment_variant.rb', line 4 def config @config end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/json/experiment_variant.rb', line 4 def name @name end |
Instance Method Details
#==(o) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/json/experiment_variant.rb', line 11 def ==(o) return true if self.object_id == o.object_id return false if o.nil? || self.class != o.class that = o @name == that.name && @config == that.config end |
#hash_code ⇒ Object
19 20 21 |
# File 'lib/json/experiment_variant.rb', line 19 def hash_code { name: @name, config: @config } end |
#to_s ⇒ Object
23 24 25 26 27 28 |
# File 'lib/json/experiment_variant.rb', line 23 def to_s "ExperimentVariant{" + "name='#{@name}'" + ", config='#{@config}'" + "}" end |