Class: RubyCurses::ListDataEvent

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

Overview

When an event is fired by Listbox, contents are changed, then this object will be passed to trigger shamelessly plugged from a legacy language best unnamed type is CONTENTS_CHANGED, INTERVAL_ADDED, INTERVAL_REMOVED

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(index0, index1, source, type) ⇒ ListDataEvent

Returns a new instance of ListDataEvent.



28
29
30
31
32
33
# File 'lib/rbcurse/rlistbox.rb', line 28

def initialize index0, index1, source, type
  @index0 = index0
  @index1 = index1
  @source = source
  @type = type
end

Instance Attribute Details

#index0Object

Returns the value of attribute index0.



27
28
29
# File 'lib/rbcurse/rlistbox.rb', line 27

def index0
  @index0
end

#index1Object

Returns the value of attribute index1.



27
28
29
# File 'lib/rbcurse/rlistbox.rb', line 27

def index1
  @index1
end

#sourceObject

Returns the value of attribute source.



27
28
29
# File 'lib/rbcurse/rlistbox.rb', line 27

def source
  @source
end

#typeObject

Returns the value of attribute type.



27
28
29
# File 'lib/rbcurse/rlistbox.rb', line 27

def type
  @type
end

Instance Method Details

#inspectObject



37
38
39
# File 'lib/rbcurse/rlistbox.rb', line 37

def inspect
  "#{@type.to_s}, #{@source}, #{@index0}, #{@index1}"
end

#to_sObject



34
35
36
# File 'lib/rbcurse/rlistbox.rb', line 34

def to_s
  "#{@type.to_s}, #{@source}, #{@index0}, #{@index1}"
end