Class: RubyCurses::TableModelEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/rbcurse/rtable.rb

Overview

When an event is fired by TableModel, contents are changed, then this object will be passed to trigger type is :INSERT :UPDATE :DELETE :HEADER_ROW columns: number or :ALL_COLUMNS

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(firstrow, lastrow, column, source, type) ⇒ TableModelEvent

Returns a new instance of TableModelEvent.



1654
1655
1656
1657
1658
1659
1660
# File 'lib/rbcurse/rtable.rb', line 1654

def initialize firstrow, lastrow, column, source, type
  @firstrow = firstrow
  @lastrow = lastrow
  @column = column
  @source = source
  @type = type
end

Instance Attribute Details

#columnObject

Returns the value of attribute column.



1653
1654
1655
# File 'lib/rbcurse/rtable.rb', line 1653

def column
  @column
end

#firstrowObject

Returns the value of attribute firstrow.



1653
1654
1655
# File 'lib/rbcurse/rtable.rb', line 1653

def firstrow
  @firstrow
end

#lastrowObject

Returns the value of attribute lastrow.



1653
1654
1655
# File 'lib/rbcurse/rtable.rb', line 1653

def lastrow
  @lastrow
end

#sourceObject

Returns the value of attribute source.



1653
1654
1655
# File 'lib/rbcurse/rtable.rb', line 1653

def source
  @source
end

#typeObject

Returns the value of attribute type.



1653
1654
1655
# File 'lib/rbcurse/rtable.rb', line 1653

def type
  @type
end

Instance Method Details

#inspectObject



1664
1665
1666
# File 'lib/rbcurse/rtable.rb', line 1664

def inspect
  to_s
end

#to_sObject



1661
1662
1663
# File 'lib/rbcurse/rtable.rb', line 1661

def to_s
  "#{@type.to_s}, firstrow: #{@firstrow}, lastrow: #{@lastrow}, column: #{@column}, source: #{@source}"
end