Module: Roast::Cog::Output::WithText
- Defined in:
- lib/roast/cog/output.rb
Overview
@requires_ancestor: Roast::Cog::Output
Instance Method Summary collapse
-
#lines ⇒ Object
Get the output as an array of lines with each line’s whitespace stripped.
-
#text ⇒ Object
Get the output as a single string with surrounding whitespace removed.
Instance Method Details
#lines ⇒ Object
Get the output as an array of lines with each line’s whitespace stripped
This method splits the output into individual lines and removes leading and trailing whitespace from each line.
#### See Also
-
‘text`
: () -> Array
287 288 289 |
# File 'lib/roast/cog/output.rb', line 287 def lines raw_text.lines.map(&:strip) end |
#text ⇒ Object
Get the output as a single string with surrounding whitespace removed
This method returns the text output with leading and trailing whitespace stripped.
#### See Also
-
‘lines`
: () -> String
274 275 276 |
# File 'lib/roast/cog/output.rb', line 274 def text raw_text.strip end |