Class: RubyCurses::InputDataEvent

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(index0, index1, source, type, row, text) ⇒ InputDataEvent

Returns a new instance of InputDataEvent.



19
20
21
22
23
24
25
26
# File 'lib/rbcurse/rinputdataevent.rb', line 19

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

Instance Attribute Details

#index0Object

Returns the value of attribute index0.



18
19
20
# File 'lib/rbcurse/rinputdataevent.rb', line 18

def index0
  @index0
end

#index1Object

Returns the value of attribute index1.



18
19
20
# File 'lib/rbcurse/rinputdataevent.rb', line 18

def index1
  @index1
end

#rowObject

Returns the value of attribute row.



18
19
20
# File 'lib/rbcurse/rinputdataevent.rb', line 18

def row
  @row
end

#sourceObject

Returns the value of attribute source.



18
19
20
# File 'lib/rbcurse/rinputdataevent.rb', line 18

def source
  @source
end

#textObject

Returns the value of attribute text.



18
19
20
# File 'lib/rbcurse/rinputdataevent.rb', line 18

def text
  @text
end

#typeObject

Returns the value of attribute type.



18
19
20
# File 'lib/rbcurse/rinputdataevent.rb', line 18

def type
  @type
end

Instance Method Details

#inspectObject



30
31
32
33
34
# File 'lib/rbcurse/rinputdataevent.rb', line 30

def inspect
  ## now that textarea.to_s prints content we shouldn pass it here.
  #"#{@type.to_s}, #{@source}, ind0:#{@index0}, ind1:#{@index1}, row:#{@row}, text:#{@text}"
  "#{@type.to_s}, ind0:#{@index0}, ind1:#{@index1}, row:#{@row}, text:#{@text}"
end

#to_sObject



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

def to_s
  inspect
end