Class: ODDB::FiPDF::TestChapterWrapper::StubChapter

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

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (StubChapter) initialize

A new instance of StubChapter



19
20
21
# File 'ext/fipdf/test/chapter_wrapper_test.rb', line 19

def initialize
  @sections = []
end

Instance Attribute Details

- (Object) heading

Returns the value of attribute heading



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

def heading
  @heading
end

- (Object) sections

Returns the value of attribute sections



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

def sections
  @sections
end

Instance Method Details

- (Object) each_section(&block)



22
23
24
25
26
# File 'ext/fipdf/test/chapter_wrapper_test.rb', line 22

def each_section(&block)
  @sections.each { |chapter|
    block.call(chapter)
  }
end

- (Object) first_section



27
28
29
# File 'ext/fipdf/test/chapter_wrapper_test.rb', line 27

def first_section
  @sections.first
end