Class: ExperimentApplication

Inherits:
Object
  • Object
show all
Defined in:
lib/json/experiment_application.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = nil) ⇒ ExperimentApplication

Returns a new instance of ExperimentApplication.



6
7
8
# File 'lib/json/experiment_application.rb', line 6

def initialize(name = nil)
  @name = name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/json/experiment_application.rb', line 4

def name
  @name
end

Instance Method Details

#==(o) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/json/experiment_application.rb', line 10

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
end

#hash_codeObject



18
19
20
# File 'lib/json/experiment_application.rb', line 18

def hash_code
  { name: @name }
end

#to_sObject



22
23
24
25
26
# File 'lib/json/experiment_application.rb', line 22

def to_s
  "ExperimentApplication{" +
    "name='" + @name + "'" +
    "}"
end