Class: Aperitiiif::CLI::Batch

Inherits:
SubCommandBase show all
Defined in:
lib/aperitiiif/cli.rb

Overview

TO DO COMMENT

Instance Method Summary collapse

Methods inherited from SubCommandBase

banner, subcommand_prefix

Instance Method Details

#buildObject

has smells :reek:FeatureEnvy, :reek:TooManyStatements rubocop:disable Metrics/AbcSize



31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/aperitiiif/cli.rb', line 31

def build
  batch = Aperitiiif::Batch.new
  batch.load_config_file(options[:config]) if options[:config].present?
  batch.reset if options[:reset]
  batch.lint  if options[:lint]

  batch.write_target_assets
  batch.write_presentation_json
  index = Aperitiiif::Index.new batch
  index.write type: :html
  index.write type: :json
end

#lintObject



52
53
54
55
# File 'lib/aperitiiif/cli.rb', line 52

def lint
  batch = Aperitiiif::Batch.new
  batch.lint
end

#resetObject



46
47
48
49
# File 'lib/aperitiiif/cli.rb', line 46

def reset
  batch = Aperitiiif::Batch.new
  batch.reset
end