Class: PDF::Reader::PrintReceiver

Inherits:
Object
  • Object
show all
Defined in:
lib/pdf/reader/print_receiver.rb

Overview

A simple receiver that prints all operaters and parameters in the content stream of a single page.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePrintReceiver

Returns a new instance of PrintReceiver.



13
14
15
# File 'lib/pdf/reader/print_receiver.rb', line 13

def initialize
  @callbacks = []
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(methodname, *args) ⇒ Object



21
22
23
# File 'lib/pdf/reader/print_receiver.rb', line 21

def method_missing(methodname, *args)
  puts "#{methodname} => #{args.inspect}"
end

Instance Attribute Details

#callbacksObject

Returns the value of attribute callbacks.



11
12
13
# File 'lib/pdf/reader/print_receiver.rb', line 11

def callbacks
  @callbacks
end

Instance Method Details

#respond_to?(meth) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/pdf/reader/print_receiver.rb', line 17

def respond_to?(meth)
  true
end