Class: Klipbook::Commands::Exporters::JSONExporter

Inherits:
Exporter
  • Object
show all
Defined in:
lib/klipbook/commands/exporters/json_exporter.rb

Instance Method Summary collapse

Methods inherited from Exporter

#initialize, #run!

Constructor Details

This class inherits a constructor from Klipbook::Commands::Exporters::Exporter

Instance Method Details

#extensionObject



11
12
13
# File 'lib/klipbook/commands/exporters/json_exporter.rb', line 11

def extension
  "json"
end

#render_contents(book) ⇒ Object



7
8
9
# File 'lib/klipbook/commands/exporters/json_exporter.rb', line 7

def render_contents(book)
  JSON.pretty_generate(book)
end