lib/lotus/commands/routes.rb in lotusrb-0.4.0 vs lib/lotus/commands/routes.rb in lotusrb-0.4.1

- old
+ new

@@ -1,13 +1,24 @@ module Lotus module Commands class Routes def initialize(environment) - environment.require_application_environment + @environment = environment + @environment.require_application_environment end def start - puts Lotus::Container.new.routes.inspector.to_s + puts app.routes.inspector.to_s + end + + private + + def app + if @environment.container? + Lotus::Container.new + else + Lotus::Application.applications.first.new + end end end end end