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.



694
695
696
697
# File 'lib/tui.rb', line 694

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

Instance Attribute Details

#charObject (readonly)

Returns the value of attribute char.



692
693
694
# File 'lib/tui.rb', line 692

def char
  @char
end

#styleObject (readonly)

Returns the value of attribute style.



692
693
694
# File 'lib/tui.rb', line 692

def style
  @style
end

Instance Method Details

#with_style(style) ⇒ Object



699
700
701
# File 'lib/tui.rb', line 699

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