Class: Warg::Console::SelectGraphicRendition::Renderer

Inherits:
Object
  • Object
show all
Defined in:
lib/warg.rb

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ Renderer

Returns a new instance of Renderer.



556
557
558
559
# File 'lib/warg.rb', line 556

def initialize(text)
  @text = text
  @select_graphic_rendition = SelectGraphicRendition.new
end

Instance Method Details

#to_sObject



566
567
568
# File 'lib/warg.rb', line 566

def to_s
  @select_graphic_rendition.(@text)
end

#to_strObject



570
571
572
# File 'lib/warg.rb', line 570

def to_str
  to_s
end

#with(**options) ⇒ Object



561
562
563
564
# File 'lib/warg.rb', line 561

def with(**options)
  @select_graphic_rendition = @select_graphic_rendition.modify(**options)
  self
end