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

#initializeStubWriter

Returns 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

#add_text_wrap_resultsObject

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

#heightObject

Returns the value of attribute height.



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

def height
  @height
end

#num_linesObject

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

#add_text_wrap(*args) ⇒ Object



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

#font_height(*args) ⇒ Object



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

def font_height(*args)
	@height
end

#select_font(*args) ⇒ Object



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

def select_font(*args)
end