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



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

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.



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

def index0
  @index0
end

#index1Object

Returns the value of attribute index1.



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

def index1
  @index1
end

#sourceObject

Returns the value of attribute source.



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

def source
  @source
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end

Instance Method Details

#inspectObject



40
41
42
# File 'lib/rbcurse/rlistbox.rb', line 40

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

#to_sObject



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

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