Class: RubyCurses::ListSelectionEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/rbcurse/extras/include/listselectable.rb

Overview

class containing information relating to selections on a list

2010-09-21 19:46 NOTE: Earlier source contained the model object, now it returns the parent
You may do source.list_data_model() to get the model
Typical operations on source would get selected_value(s), or selected_index

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(firstrow, lastrow, source, type) ⇒ ListSelectionEvent

Returns a new instance of ListSelectionEvent.



131
132
133
134
135
136
# File 'lib/rbcurse/extras/include/listselectable.rb', line 131

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.



130
131
132
# File 'lib/rbcurse/extras/include/listselectable.rb', line 130

def firstrow
  @firstrow
end

#lastrowObject

Returns the value of attribute lastrow.



130
131
132
# File 'lib/rbcurse/extras/include/listselectable.rb', line 130

def lastrow
  @lastrow
end

#sourceObject

Returns the value of attribute source.



130
131
132
# File 'lib/rbcurse/extras/include/listselectable.rb', line 130

def source
  @source
end

#typeObject

Returns the value of attribute type.



130
131
132
# File 'lib/rbcurse/extras/include/listselectable.rb', line 130

def type
  @type
end

Instance Method Details

#inspectObject



140
141
142
# File 'lib/rbcurse/extras/include/listselectable.rb', line 140

def inspect
  to_s
end

#to_sObject



137
138
139
# File 'lib/rbcurse/extras/include/listselectable.rb', line 137

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