Class: A4Tools::StandardOutput
- Inherits:
-
Object
- Object
- A4Tools::StandardOutput
- Defined in:
- lib/net_shell/io.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#color ⇒ Object
Returns the value of attribute color.
Instance Method Summary collapse
Instance Attribute Details
#color ⇒ Object
Returns the value of attribute color.
13 14 15 |
# File 'lib/net_shell/io.rb', line 13 def color @color end |
Instance Method Details
#close ⇒ Object
20 21 |
# File 'lib/net_shell/io.rb', line 20 def close end |
#print(s = "") ⇒ Object
23 24 25 |
# File 'lib/net_shell/io.rb', line 23 def print(s="") write s.to_s end |
#puts(s = "") ⇒ Object
27 28 29 |
# File 'lib/net_shell/io.rb', line 27 def puts(s="") write s.to_s+"\n" end |
#write(s) ⇒ Object
15 16 17 18 |
# File 'lib/net_shell/io.rb', line 15 def write(s) s = s.unstyle unless @color $stdout.write s.gsub("\t", " ").gsub("\n","\r\n") end |