Class: ODDB::FiPDF::TestFormat::StubWriter

Inherits:
Object
  • Object
show all
Defined in:
ext/fipdf/test/format_test.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (StubWriter) initialize

A new instance of StubWriter



17
18
19
20
# File 'ext/fipdf/test/format_test.rb', line 17

def initialize
  @add_text_wrap_results = []
  @calls = 0
end

Instance Attribute Details

- (Object) add_text_wrap_results

Returns the value of attribute add_text_wrap_results



16
17
18
# File 'ext/fipdf/test/format_test.rb', line 16

def add_text_wrap_results
  @add_text_wrap_results
end

- (Object) height

Returns the value of attribute height



16
17
18
# File 'ext/fipdf/test/format_test.rb', line 16

def height
  @height
end

- (Object) num_lines

Returns the value of attribute num_lines



16
17
18
# File 'ext/fipdf/test/format_test.rb', line 16

def num_lines
  @num_lines
end

Instance Method Details

- (Object) add_text_wrap(*args)



23
24
25
26
27
28
29
30
# File 'ext/fipdf/test/format_test.rb', line 23

def add_text_wrap(*args)
  @calls += 1
  if (@calls >= 2)
    ""
  else
    "foo"
  end
end

- (Object) font_height(*args)



31
32
33
# File 'ext/fipdf/test/format_test.rb', line 31

def font_height(*args)
  @height
end

- (Object) select_font(*args)



21
22
# File 'ext/fipdf/test/format_test.rb', line 21

def select_font(*args)
end