Class: TestHtmlParser::StubFormatter

Inherits:
Object
  • Object
show all
Defined in:
test/test_util/html_parser.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (StubFormatter) initialize

A new instance of StubFormatter



23
24
25
26
27
# File 'test/test_util/html_parser.rb', line 23

def initialize
  @flowing_data = ''
  @literal_data = ''
  @called = false
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

- (Object) method_missing(mname, *args)



40
41
42
# File 'test/test_util/html_parser.rb', line 40

def method_missing(mname, *args)
  @called = mname
end

Instance Attribute Details

- (Object) called (readonly)

Returns the value of attribute called



22
23
24
# File 'test/test_util/html_parser.rb', line 22

def called
  @called
end

- (Object) flowing_data

Returns the value of attribute flowing_data



21
22
23
# File 'test/test_util/html_parser.rb', line 21

def flowing_data
  @flowing_data
end

- (Object) literal_data

Returns the value of attribute literal_data



21
22
23
# File 'test/test_util/html_parser.rb', line 21

def literal_data
  @literal_data
end

Instance Method Details

- (Object) add_flowing_data(data)



28
29
30
# File 'test/test_util/html_parser.rb', line 28

def add_flowing_data(data)
  @flowing_data << data
end

- (Object) add_literal_data(data)



31
32
33
# File 'test/test_util/html_parser.rb', line 31

def add_literal_data(data)
  @literal_data << data
end

- (Object) end_paragraph(*args)



34
35
# File 'test/test_util/html_parser.rb', line 34

def end_paragraph(*args)
end

- (Object) pop_font



36
37
# File 'test/test_util/html_parser.rb', line 36

def pop_font
end

- (Object) push_font(*args)



38
39
# File 'test/test_util/html_parser.rb', line 38

def push_font(*args)
end