Module: ShellOpts::Grammar::WrappedNode

Included in:
Brief, Paragraph
Defined in:
lib/shellopts/grammar.rb,
lib/shellopts/formatter.rb

Instance Method Summary collapse

Instance Method Details

#lines(width, initial = 0) ⇒ Object



345
# File 'lib/shellopts/grammar.rb', line 345

def lines(width, initial = 0) @lines ||= words.wrap(width, initial) end

#puts_descr(width = Formatter.rest) ⇒ Object



176
# File 'lib/shellopts/formatter.rb', line 176

def puts_descr(width = Formatter.rest) puts lines(width) end

#wordsObject



344
# File 'lib/shellopts/grammar.rb', line 344

def words() @words ||= text.split(" ") end