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

#initializeStubChapter

Returns 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

#headingObject

Returns the value of attribute heading.



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

def heading
  @heading
end

#sectionsObject

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

#each_section(&block) ⇒ Object



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

#first_sectionObject



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

def first_section
  @sections.first
end