Class: Eskimo::ASCII::Wrap
- Defined in:
- gems/eskimo-ascii/lib/eskimo/ascii/components/wrap.rb
Instance Attribute Summary collapse
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(width: Constants::SCREEN_COLUMNS, &children) ⇒ Wrap
constructor
A new instance of Wrap.
- #render ⇒ Object
Constructor Details
#initialize(width: Constants::SCREEN_COLUMNS, &children) ⇒ Wrap
Returns a new instance of Wrap
15 16 17 18 |
# File 'gems/eskimo-ascii/lib/eskimo/ascii/components/wrap.rb', line 15 def initialize(width: Constants::SCREEN_COLUMNS, &children) @width = width super end |
Instance Attribute Details
#width ⇒ Object (readonly)
Returns the value of attribute width
13 14 15 |
# File 'gems/eskimo-ascii/lib/eskimo/ascii/components/wrap.rb', line 13 def width @width end |
Instance Method Details
#render ⇒ Object
20 21 22 |
# File 'gems/eskimo-ascii/lib/eskimo/ascii/components/wrap.rb', line 20 def render(**) Strings.wrap(super, width) end |