Class: CheekyDreams::Dev::IO
- Inherits:
-
Object
- Object
- CheekyDreams::Dev::IO
- Defined in:
- lib/cheeky-dreams.rb
Instance Method Summary collapse
- #go(rgb) ⇒ Object
-
#initialize(io = $stdout) ⇒ IO
constructor
A new instance of IO.
Constructor Details
#initialize(io = $stdout) ⇒ IO
Returns a new instance of IO.
200 201 202 |
# File 'lib/cheeky-dreams.rb', line 200 def initialize io = $stdout @io, @last = io, nil end |
Instance Method Details
#go(rgb) ⇒ Object
204 205 206 207 |
# File 'lib/cheeky-dreams.rb', line 204 def go rgb @io.puts "[#{rgb.join(',')}]" unless rgb == @last @last = rgb end |