Class: FPM::Cookery::CLI::InspectCmd

Inherits:
Command show all
Defined in:
lib/fpm/cookery/cli.rb

Instance Method Summary collapse

Methods inherited from Command

add_recipe_parameter!, #config, #execute, #init_logging, #recipe_file, #show_version, #validate

Instance Method Details

#exec(config, recipe, packager) ⇒ Object



186
187
188
189
190
191
192
# File 'lib/fpm/cookery/cli.rb', line 186

def exec(config, recipe, packager)
  unless format.nil?
    puts recipe.template(format)
  else
    puts terse? ? recipe.to_json : recipe.to_pretty_json
  end
end