Class: LaundryView::Machine
- Inherits:
-
Object
- Object
- LaundryView::Machine
- Defined in:
- lib/laundryview/main.rb
Instance Attribute Summary collapse
-
#broken ⇒ Object
readonly
Returns the value of attribute broken.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#remaining ⇒ Object
readonly
Returns the value of attribute remaining.
Instance Method Summary collapse
-
#initialize(status) ⇒ Machine
constructor
A new instance of Machine.
Constructor Details
#initialize(status) ⇒ Machine
Returns a new instance of Machine.
55 56 57 58 59 60 61 62 63 |
# File 'lib/laundryview/main.rb', line 55 def initialize status if status == "out of service" @broken = true @remaining = 0 else @broken = false @remaining = calc_remaining(status) end end |
Instance Attribute Details
#broken ⇒ Object (readonly)
Returns the value of attribute broken.
52 53 54 |
# File 'lib/laundryview/main.rb', line 52 def broken @broken end |
#kind ⇒ Object
Returns the value of attribute kind.
53 54 55 |
# File 'lib/laundryview/main.rb', line 53 def kind @kind end |
#remaining ⇒ Object (readonly)
Returns the value of attribute remaining.
52 53 54 |
# File 'lib/laundryview/main.rb', line 52 def remaining @remaining end |