Class: Epuber::Checker::BookspecChecker

Inherits:
Epuber::Checker show all
Defined in:
lib/epuber/checker/bookspec_checker.rb

Instance Attribute Summary collapse

Attributes inherited from Epuber::CheckerTransformerBase

#block, #options, #source_type

Instance Method Summary collapse

Methods inherited from Epuber::Checker

#error, map_source_type__class, #warning

Methods inherited from Epuber::CheckerTransformerBase

class_for_source_type, #initialize, map_source_type__class, #valid_options

Constructor Details

This class inherits a constructor from Epuber::CheckerTransformerBase

Instance Attribute Details

#bookEpuber::Book (readonly)

Returns:



10
11
12
# File 'lib/epuber/checker/bookspec_checker.rb', line 10

def book
  @book
end

Instance Method Details

#call(book, compilation_context) ⇒ Object

Returns nil.

Parameters:

  • book (Epuber::Book)
  • compilation_context (CompilationContext)

Returns:

  • nil



17
18
19
20
21
22
23
# File 'lib/epuber/checker/bookspec_checker.rb', line 17

def call(book, compilation_context)
  @book = book

  @block.call(self, book, compilation_context)

  @book = nil
end