Class: Lingo::Attendee::TextReader::PDFFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/lingo/attendee/text_reader.rb

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (PDFFilter) initialize(&block)

A new instance of PDFFilter



255
256
257
# File 'lib/lingo/attendee/text_reader.rb', line 255

def initialize(&block)
  @block = block
end

Class Method Details

+ (Object) filter(io, &block)



251
252
253
# File 'lib/lingo/attendee/text_reader.rb', line 251

def self.filter(io, &block)
  PDF::Reader.new.parse(io, new(&block))
end

Instance Method Details

- (Object) show_text(string, *params) Also known as: super_show_text, move_to_next_line_and_show_text, set_spacing_next_line_show_text



259
260
261
# File 'lib/lingo/attendee/text_reader.rb', line 259

def show_text(string, *params)
  @block[string << '|']
end

- (Object) show_text_with_positioning(params)



267
268
269
# File 'lib/lingo/attendee/text_reader.rb', line 267

def show_text_with_positioning(params, *)
  params.each { |param| show_text(param) if param.is_a?(String) }
end