Class: Wasko::CLI
Overview
[thor](github.com/wycats/thor)
Instance Method Summary collapse
- #background(color_name = "") ⇒ Object
- #cursor(color_name = "") ⇒ Object
- #font(font_name = "", font_size = 14) ⇒ Object
- #palette(color_name = "") ⇒ Object
- #strong(color_name = "") ⇒ Object
- #text(color_name = "") ⇒ Object
Instance Method Details
#background(color_name = "") ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 |
# File 'bin/wasko', line 39 def background(color_name="") if color_name.empty? say Wasko.background_color else if Wasko::Color.color_from_string(color_name) Wasko.set_background_color color_name else error "#{color_name} is not a color." end end end |
#cursor(color_name = "") ⇒ Object
65 66 67 68 69 70 71 |
# File 'bin/wasko', line 65 def cursor(color_name="") if color_name.empty? say Wasko.cursor_color else Wasko.set_cursor_color color_name end end |
#font(font_name = "", font_size = 14) ⇒ Object
74 75 76 77 78 79 80 |
# File 'bin/wasko', line 74 def font(font_name = "", font_size = 14) if font_name.empty? say Wasko.font else Wasko.set_font font_name, font_size end end |
#palette(color_name = "") ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 |
# File 'bin/wasko', line 52 def palette(color_name="") if color_name.empty? say Wasko.palette else if Wasko::Color.color_from_string(color_name) Wasko.set_palette color_name else error "#{color_name} is not a color." end end end |
#strong(color_name = "") ⇒ Object
30 31 32 33 34 35 36 |
# File 'bin/wasko', line 30 def strong(color_name="") if color_name.empty? say Wasko.bold_color else Wasko.set_bold_color color_name end end |
#text(color_name = "") ⇒ Object
21 22 23 24 25 26 27 |
# File 'bin/wasko', line 21 def text(color_name="") if color_name.empty? say Wasko.foreground_color else Wasko.set_text_color color_name end end |