Class: Epuber::Checker

Inherits:
CheckerTransformerBase show all
Defined in:
lib/epuber/checker.rb,
lib/epuber/checker/text_checker.rb,
lib/epuber/checker/bookspec_checker.rb

Direct Known Subclasses

BookspecChecker, TextChecker

Defined Under Namespace

Classes: BookspecChecker, TextChecker

Instance Attribute Summary

Attributes inherited from CheckerTransformerBase

#block, #options, #source_type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CheckerTransformerBase

#call, class_for_source_type, #initialize, #valid_options

Constructor Details

This class inherits a constructor from Epuber::CheckerTransformerBase

Class Method Details

.map_source_type__classHash<Symbol, Class>

Returns:

  • (Hash<Symbol, Class>)


12
13
14
15
16
17
18
# File 'lib/epuber/checker.rb', line 12

def self.map_source_type__class
  {
    result_text_xhtml_string: TextChecker,
    source_text_file: TextChecker,
    bookspec: BookspecChecker,
  }.merge(super)
end

Instance Method Details

#error(messsage, location: caller_locations.first) ⇒ Object



24
25
26
# File 'lib/epuber/checker.rb', line 24

def error(messsage, location: caller_locations.first)
  UI.error(messsage, location: location)
end

#warning(messsage, location: caller_locations.first) ⇒ Object



20
21
22
# File 'lib/epuber/checker.rb', line 20

def warning(messsage, location: caller_locations.first)
  UI.warning(messsage, location: location)
end