Class: Marvi::Renderer::Curses::TabBar::Item

Inherits:
Struct
  • Object
show all
Defined in:
lib/marvi/renderer/curses/tab_bar.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#colObject

Returns the value of attribute col

Returns:

  • (Object)

    the current value of col



12
13
14
# File 'lib/marvi/renderer/curses/tab_bar.rb', line 12

def col
  @col
end

#indexObject

Returns the value of attribute index

Returns:

  • (Object)

    the current value of index



12
13
14
# File 'lib/marvi/renderer/curses/tab_bar.rb', line 12

def index
  @index
end

#rowObject

Returns the value of attribute row

Returns:

  • (Object)

    the current value of row



12
13
14
# File 'lib/marvi/renderer/curses/tab_bar.rb', line 12

def row
  @row
end

#textObject

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



12
13
14
# File 'lib/marvi/renderer/curses/tab_bar.rb', line 12

def text
  @text
end

#widthObject

Returns the value of attribute width

Returns:

  • (Object)

    the current value of width



12
13
14
# File 'lib/marvi/renderer/curses/tab_bar.rb', line 12

def width
  @width
end

Instance Method Details

#contains?(y, x) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/marvi/renderer/curses/tab_bar.rb', line 13

def contains?(y, x)
  y == row && x >= col && x < col + width
end