Class: WIP::Runner::Spec::Helpers::UIHelpers::CustomLine
- Inherits:
-
HighLine
- Object
- HighLine
- WIP::Runner::Spec::Helpers::UIHelpers::CustomLine
- Defined in:
- lib/wip/runner/spec/helpers/ui_helpers.rb
Instance Method Summary collapse
-
#ask(question, answer_type = String, &block) ⇒ Object
Strips the same-line indicating, trailing space from questions in order to print the newline in specs (that would come from user input).
-
#color(string, *colors) ⇒ Object
Strips formatting for specs.
-
#say(statement) ⇒ Object
Strips double spaces between question and default.
Instance Method Details
#ask(question, answer_type = String, &block) ⇒ Object
Strips the same-line indicating, trailing space from questions in order to print the newline in specs (that would come from user input).
61 62 63 |
# File 'lib/wip/runner/spec/helpers/ui_helpers.rb', line 61 def ask(question, answer_type = String, &block) super("#{question.rstrip}", answer_type, &block) end |
#color(string, *colors) ⇒ Object
Strips formatting for specs.
71 72 73 |
# File 'lib/wip/runner/spec/helpers/ui_helpers.rb', line 71 def color(string, *colors) string end |
#say(statement) ⇒ Object
Strips double spaces between question and default.
66 67 68 |
# File 'lib/wip/runner/spec/helpers/ui_helpers.rb', line 66 def say(statement) super(statement.to_s.gsub(/:\s{2,}\|/, ': |')) end |