lib/wlang/command.rb in wlang-2.1.0 vs lib/wlang/command.rb in wlang-2.1.1
- old
+ new
@@ -44,11 +44,16 @@
def execute(argv)
install(argv)
if @ast
- require 'awesome_print'
- ap @template.to_ast
+ begin
+ require 'awesome_print'
+ ap @template.to_ast
+ rescue LoadError
+ puts "HINT: install the 'awesome_print' gem for pretty output!"
+ puts @template.to_ast.inspect
+ end
end
with_output do |output|
@template.render(@context, output)
end
\ No newline at end of file