class Eskimo::ASCII::Indent
Indent
text from the left.
Indent.new(width: 8) do [ "Hello", SoftBreak.new, "World!" ] end # => " Hello" # " World!"
Attributes
width[R]
Public Class Methods
new(width: 4, &children)
click to toggle source
Calls superclass method
Eskimo::ASCII::Component::new
# File lib/eskimo/ascii/components/indent.rb, line 14 def initialize(width: 4, &children) @width = width super end
Public Instance Methods
render(**)
click to toggle source
Calls superclass method
Eskimo::ASCII::Component#render
# File lib/eskimo/ascii/components/indent.rb, line 19 def render(**) Strings.pad(super, [0,0,0,width]) end