Class: Bookworm::BaseReport

Inherits:
Object
  • Object
show all
Defined in:
lib/bookworm/report_builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(knowledge_base) ⇒ BaseReport

Returns a new instance of BaseReport.



34
35
36
37
# File 'lib/bookworm/report_builder.rb', line 34

def initialize(knowledge_base)
  @kb = knowledge_base
  output
end

Instance Method Details

#default_outputObject



47
48
49
# File 'lib/bookworm/report_builder.rb', line 47

def default_output
  :to_plain
end

#outputObject



51
52
53
# File 'lib/bookworm/report_builder.rb', line 51

def output
  send(default_output)
end

#to_json(*_args) ⇒ Object



43
44
45
# File 'lib/bookworm/report_builder.rb', line 43

def to_json(*_args)
  JSON.dump({})
end

#to_plainObject



39
40
41
# File 'lib/bookworm/report_builder.rb', line 39

def to_plain
  ''
end