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



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

def center
  @center
end

#leftObject

Returns the value of attribute left

Returns:

  • (Object)

    the current value of left



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

def left
  @left
end

#rightObject

Returns the value of attribute right

Returns:

  • (Object)

    the current value of right



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

def right
  @right
end

Instance Method Details

#colorize(border, style) ⇒ Object

Colorize characters with a given style



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

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