Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/stock_quote_cli.rb
Instance Method Summary collapse
- #color(text, color_code) ⇒ Object
- #green ⇒ Object
-
#red ⇒ Object
color methods from github.com/pierot/stockery/blob/master/lib/stockery.rb.
- #yellow ⇒ Object
Instance Method Details
#color(text, color_code) ⇒ Object
9 10 11 |
# File 'lib/stock_quote_cli.rb', line 9 def color(text, color_code) "#{color_code}#{text}\e[0m" end |
#green ⇒ Object
6 |
# File 'lib/stock_quote_cli.rb', line 6 def green; color(self, "\e[1m\e[32m"); end |
#red ⇒ Object
color methods from github.com/pierot/stockery/blob/master/lib/stockery.rb
5 |
# File 'lib/stock_quote_cli.rb', line 5 def red; color(self, "\e[31m"); end |
#yellow ⇒ Object
7 |
# File 'lib/stock_quote_cli.rb', line 7 def yellow; color(self, "\e[0;33m"); end |