class Eskimo::ASCII::Style

Style text with colors and custom formatting.

See [Pastel's documentation] for the accepted styles.

[pastel]: github.com/piotrmurach/pastel

Attributes

pastel[R]
style[R]

Public Class Methods

new(*style, &children) click to toggle source
Calls superclass method Eskimo::ASCII::Component::new
# File lib/eskimo/ascii/components/style.rb, line 12
def initialize(*style, &children)
  @style = style.flatten
  @pastel = Pastel.new

  super
end

Public Instance Methods

render(**) click to toggle source
Calls superclass method Eskimo::ASCII::Component#render
# File lib/eskimo/ascii/components/style.rb, line 19
def render(**)
  pastel.decorate(super, *style)
end