Class: Tabula::TextElementIndex::SaveToListProcedure

Inherits:
Object
  • Object
show all
Includes:
Java::GnuTroveProcedure::TIntProcedure
Defined in:
lib/tabula/entities/text_element_index.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent) ⇒ SaveToListProcedure

Returns a new instance of SaveToListProcedure.



11
12
13
14
# File 'lib/tabula/entities/text_element_index.rb', line 11

def initialize(parent)
  @parent = parent
  @list = []
end

Instance Attribute Details

#listObject (readonly)

Returns the value of attribute list.



9
10
11
# File 'lib/tabula/entities/text_element_index.rb', line 9

def list
  @list
end

Instance Method Details

#execute(id) ⇒ Object



16
17
18
19
# File 'lib/tabula/entities/text_element_index.rb', line 16

def execute(id)
  @list << @parent.te_dict[id]
  return true
end

#reset!Object



21
22
23
# File 'lib/tabula/entities/text_element_index.rb', line 21

def reset!
  @list = []
end