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.



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

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

Instance Attribute Details

#charObject (readonly)

Returns the value of attribute char.



640
641
642
# File 'lib/tui.rb', line 640

def char
  @char
end

#styleObject (readonly)

Returns the value of attribute style.



640
641
642
# File 'lib/tui.rb', line 640

def style
  @style
end

Instance Method Details

#with_style(style) ⇒ Object



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

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