Class: BoPeep::Console::SelectGraphicRendition::Renderer

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

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ Renderer

Returns a new instance of Renderer.



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

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

Instance Method Details

#to_sObject



579
580
581
# File 'lib/bopeep.rb', line 579

def to_s
  @select_graphic_rendition.(@text)
end

#to_strObject



583
584
585
# File 'lib/bopeep.rb', line 583

def to_str
  to_s
end

#with(**options) ⇒ Object



574
575
576
577
# File 'lib/bopeep.rb', line 574

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