Class: Rigor::Treatment

Inherits:
Object
  • Object
show all
Defined in:
lib/rigor/treatment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, weight = 1) ⇒ Treatment

Returns a new instance of Treatment.



3
4
5
6
# File 'lib/rigor/treatment.rb', line 3

def initialize(name, weight = 1)
  @name   = name
  @weight = weight
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/rigor/treatment.rb', line 8

def name
  @name
end

#weightObject (readonly)

Returns the value of attribute weight.



9
10
11
# File 'lib/rigor/treatment.rb', line 9

def weight
  @weight
end