Class: RubyCurses::TreeModelEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/rbcurse/core/widgets/tree/treemodel.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, source, type) ⇒ TreeModelEvent

Returns a new instance of TreeModelEvent.



233
234
235
236
237
238
# File 'lib/rbcurse/core/widgets/tree/treemodel.rb', line 233

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

Instance Attribute Details

#firstrowObject

Returns the value of attribute firstrow.



232
233
234
# File 'lib/rbcurse/core/widgets/tree/treemodel.rb', line 232

def firstrow
  @firstrow
end

#lastrowObject

Returns the value of attribute lastrow.



232
233
234
# File 'lib/rbcurse/core/widgets/tree/treemodel.rb', line 232

def lastrow
  @lastrow
end

#sourceObject

Returns the value of attribute source.



232
233
234
# File 'lib/rbcurse/core/widgets/tree/treemodel.rb', line 232

def source
  @source
end

#typeObject

Returns the value of attribute type.



232
233
234
# File 'lib/rbcurse/core/widgets/tree/treemodel.rb', line 232

def type
  @type
end

Instance Method Details

#inspectObject



242
243
244
# File 'lib/rbcurse/core/widgets/tree/treemodel.rb', line 242

def inspect
  to_s
end

#to_sObject



239
240
241
# File 'lib/rbcurse/core/widgets/tree/treemodel.rb', line 239

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