module JamRuby
  class Environment
    def self.mode
      if Object.const_defined?('Rails')
          return Rails.env
      else
        # right now, there is no idea of a non-test jam-ruby usage, because it's solely a library
        # this will need to change if we add executables to jam-ruby
        return "test"
      end
    end

    def self.application
      if Object.const_defined?('Rails')
        return 'jamweb'
      else
        return 'jamruby'
      end
    end
  end
end