Class: Chefdore::Cli

Inherits:
Thor
  • Object
show all
Defined in:
lib/chefdore/cli.rb

Instance Method Summary collapse

Instance Method Details

#convertObject



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/chefdore/cli.rb', line 18

def convert
  ARGV.replace []
  stdin = ARGF.read

  begin
    Chefdore::Magic.convert(json: stdin, cli: self)
  rescue JSON::ParserError => e
    puts e.message
    exit 1
  end

end

#versionObject



32
33
34
# File 'lib/chefdore/cli.rb', line 32

def version
  say Chefdore::VERSION
end