Class: Tui::SegmentWriter::FillSegment

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(char, style: nil) ⇒ FillSegment

Returns a new instance of FillSegment.



645
646
647
648
# File 'lib/tui.rb', line 645

def initialize(char, style: nil)
  @char = char.to_s
  @style = style
end

Instance Attribute Details

#charObject (readonly)

Returns the value of attribute char.



643
644
645
# File 'lib/tui.rb', line 643

def char
  @char
end

#styleObject (readonly)

Returns the value of attribute style.



643
644
645
# File 'lib/tui.rb', line 643

def style
  @style
end

Instance Method Details

#with_style(style) ⇒ Object



650
651
652
# File 'lib/tui.rb', line 650

def with_style(style)
  self.class.new(char, style: style)
end