Module: OptionScrapper::Utils
- Included in:
- OptionsParser, Parser
- Defined in:
- lib/optionscrapper/misc/utils.rb
Instance Method Summary collapse
- #fail(message) ⇒ Object
- #horizontal_line(length, symbol = '-', line = "") ⇒ Object
- #offset(length = 4, spacer = "") ⇒ Object
Instance Method Details
#fail(message) ⇒ Object
16 17 18 19 |
# File 'lib/optionscrapper/misc/utils.rb', line 16 def fail() puts "[error]: " << exit 1 end |
#horizontal_line(length, symbol = '-', line = "") ⇒ Object
21 22 23 24 |
# File 'lib/optionscrapper/misc/utils.rb', line 21 def horizontal_line(length, symbol = '-', line = "") length.times.each { line << "#{symbol}" } line end |
#offset(length = 4, spacer = "") ⇒ Object
11 12 13 14 |
# File 'lib/optionscrapper/misc/utils.rb', line 11 def offset(length = 4, spacer = "") length.times.each { spacer << " " } spacer end |