Class: ColoredIO
- Inherits:
-
Object
- Object
- ColoredIO
- Defined in:
- lib/vendored-middleman-deps/padrino-core-0.11.2/test/mini_shoulda.rb
Instance Method Summary collapse
-
#initialize(io) ⇒ ColoredIO
constructor
A new instance of ColoredIO.
- #print(o) ⇒ Object
- #puts(*o) ⇒ Object
Constructor Details
#initialize(io) ⇒ ColoredIO
Returns a new instance of ColoredIO.
26 27 28 |
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/test/mini_shoulda.rb', line 26 def initialize(io) @io = io end |
Instance Method Details
#print(o) ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/test/mini_shoulda.rb', line 30 def print(o) case o when "." then @io.send(:print, o.green) when "E" then @io.send(:print, o.red) when "F" then @io.send(:print, o.yellow) when "S" then @io.send(:print, o.magenta) else @io.send(:print, o) end end |
#puts(*o) ⇒ Object
40 41 42 |
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/test/mini_shoulda.rb', line 40 def puts(*o) super end |