Class: TTY::Table::Border::RowLine

Inherits:
Struct
  • Object
show all
Defined in:
lib/tty/table/border/row_line.rb

Overview

A class for a table row line chars manipulation

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#centerObject

Returns the value of attribute center

Returns:

  • (Object)

    the current value of center



8
9
10
# File 'lib/tty/table/border/row_line.rb', line 8

def center
  @center
end

#leftObject

Returns the value of attribute left

Returns:

  • (Object)

    the current value of left



8
9
10
# File 'lib/tty/table/border/row_line.rb', line 8

def left
  @left
end

#rightObject

Returns the value of attribute right

Returns:

  • (Object)

    the current value of right



8
9
10
# File 'lib/tty/table/border/row_line.rb', line 8

def right
  @right
end

Instance Method Details

#colorize(style) ⇒ Object

Colorize characters with a given style



13
14
15
16
# File 'lib/tty/table/border/row_line.rb', line 13

def colorize(style)
  colorized_chars = Border.set_color(style, right, center, left)
  self.right, self.center, self.left = colorized_chars
end