Class: Eskimo::ASCII::Indent
- Defined in:
- gems/eskimo-ascii/lib/eskimo/ascii/components/indent.rb
Overview
Instance Attribute Summary collapse
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(width: 4, &children) ⇒ Indent
constructor
A new instance of Indent.
- #render ⇒ Object
Constructor Details
#initialize(width: 4, &children) ⇒ Indent
Returns a new instance of Indent
14 15 16 17 |
# File 'gems/eskimo-ascii/lib/eskimo/ascii/components/indent.rb', line 14 def initialize(width: 4, &children) @width = width super end |
Instance Attribute Details
#width ⇒ Object (readonly)
Returns the value of attribute width
12 13 14 |
# File 'gems/eskimo-ascii/lib/eskimo/ascii/components/indent.rb', line 12 def width @width end |
Instance Method Details
#render ⇒ Object
19 20 21 |
# File 'gems/eskimo-ascii/lib/eskimo/ascii/components/indent.rb', line 19 def render(**) Strings.pad(super, [0,0,0,width]) end |