Skip to content

Commit

Permalink
This is a bit tidier.
Browse files Browse the repository at this point in the history
  • Loading branch information
lazyatom committed Apr 24, 2011
1 parent 097a915 commit a1617b9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/vanilla/console.rb
Expand Up @@ -2,9 +2,11 @@
require 'irb'

def app(reload=false)
@__vanilla_console_app = nil if reload
config = YAML.parse_file(ENV['VANILLA_CONFIG']) rescue {}
@__vanilla_console_app ||= Vanilla::App.new(config)
if !@__vanilla_console_app || reload
config = YAML.parse_file(ENV['VANILLA_CONFIG']) rescue {}
@__vanilla_console_app = Vanilla::App.new(config)
end
@__vanilla_console_app
end

puts "The Soup is simmering."

0 comments on commit a1617b9

Please sign in to comment.