Class: Pompom::View
- Inherits:
-
Object
- Object
- Pompom::View
- Defined in:
- lib/pompom.rb
Instance Attribute Summary collapse
-
#asciifier ⇒ Object
writeonly
Sets the attribute asciifier.
Instance Method Summary collapse
-
#initialize(screen) ⇒ View
constructor
A new instance of View.
- #run(&block) ⇒ Object
- #update(pomodoro) ⇒ Object
Constructor Details
Instance Attribute Details
#asciifier=(value) ⇒ Object (writeonly)
Sets the attribute asciifier
143 144 145 |
# File 'lib/pompom.rb', line 143 def asciifier=(value) @asciifier = value end |
Instance Method Details
#run(&block) ⇒ Object
150 151 152 |
# File 'lib/pompom.rb', line 150 def run(&block) @screen.run(&block) end |
#update(pomodoro) ⇒ Object
154 155 156 |
# File 'lib/pompom.rb', line 154 def update(pomodoro) @screen.display format_for_screen(pomodoro.time_remaining), color(pomodoro), blink(pomodoro) end |