Module: Rodish::Plugins::WrappedOptionsSeparator::OptionParserMethods

Includes:
Rodish::Plugins::Wrap_
Defined in:
lib/rodish/plugins/wrapped_options_separator.rb

Instance Method Summary collapse

Instance Method Details

#wrap(prefix, values, separator: " ", limit: 80) ⇒ Object

Helper method that takes an array of values, wraps them to the given limit, and adds each line as a separator. This is useful when you have a large amount of information you want to display and you want to wrap if for display to the user when showing options.



19
20
21
22
23
# File 'lib/rodish/plugins/wrapped_options_separator.rb', line 19

def wrap(prefix, values, separator: " ", limit: 80)
  super.each do |line|
    separator line
  end
end