Class: Gem::Release::Helper::Wrapper
- Inherits:
-
Struct
- Object
- Struct
- Gem::Release::Helper::Wrapper
- Defined in:
- lib/gem/release/helper/string.rb
Constant Summary collapse
- MARKDOWN =
/^(```|\*|-)/
Instance Attribute Summary collapse
-
#str ⇒ Object
Returns the value of attribute str.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
Instance Attribute Details
#str ⇒ Object
Returns the value of attribute str
4 5 6 |
# File 'lib/gem/release/helper/string.rb', line 4 def str @str end |
#width ⇒ Object
Returns the value of attribute width
4 5 6 |
# File 'lib/gem/release/helper/string.rb', line 4 def width @width end |
Instance Method Details
#apply ⇒ Object
7 8 9 10 |
# File 'lib/gem/release/helper/string.rb', line 7 def apply paras = str.split("\n\n") paras.map { |para| wrap_paragraph(para) }.join("\n\n") end |