Class: CheekyDreams::Dev::IO

Inherits:
Object
  • Object
show all
Defined in:
lib/cheeky-dreams.rb

Instance Method Summary collapse

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