Module: Cyoi::Cli::Helpers::Interactions
- Included in:
- Cyoi::Cli::Helpers
- Defined in:
- lib/cyoi/cli/helpers/interactions.rb
Instance Method Summary collapse
- #bold ⇒ Object
- #clear ⇒ Object
- #cyan ⇒ Object
- #green ⇒ Object
-
#hl ⇒ Object
Helper to access HighLine for ask & menu prompts.
- #red ⇒ Object
- #yellow ⇒ Object
Instance Method Details
#bold ⇒ Object
6 |
# File 'lib/cyoi/cli/helpers/interactions.rb', line 6 def bold; "\033[1m" end |
#clear ⇒ Object
5 |
# File 'lib/cyoi/cli/helpers/interactions.rb', line 5 def clear; "\033[0m" end |
#cyan ⇒ Object
4 |
# File 'lib/cyoi/cli/helpers/interactions.rb', line 4 def cyan; "\033[36m" end |
#green ⇒ Object
8 |
# File 'lib/cyoi/cli/helpers/interactions.rb', line 8 def green; "\033[32m" end |
#hl ⇒ Object
Helper to access HighLine for ask & menu prompts
12 13 14 |
# File 'lib/cyoi/cli/helpers/interactions.rb', line 12 def hl @hl ||= HighLine.new(@stdin, @stdout) end |
#red ⇒ Object
7 |
# File 'lib/cyoi/cli/helpers/interactions.rb', line 7 def red; "\033[31m" end |
#yellow ⇒ Object
9 |
# File 'lib/cyoi/cli/helpers/interactions.rb', line 9 def yellow; "\033[33m" end |