Module: Databasedotcom::Convenience

Defined in:
lib/databasedotcom/convenience/base.rb,
lib/databasedotcom/convenience/version.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Constant Summary collapse

VERSION =
"1.0.1"

Class Method Summary collapse

Class Method Details

.envObject



4
5
6
7
8
9
# File 'lib/databasedotcom/convenience/base.rb', line 4

def self.env
  return ENV['RAILS_ENV'].to_sym unless ENV['RAILS_ENV'].nil?
  return ENV['RACK_ENV'].to_sym  unless ENV['RACK_ENV'].nil?
  return ENV['APP_ENV'].to_sym   unless ENV['APP_ENV'].nil?
  return :development
end

.included(base) ⇒ Object



57
58
59
60
# File 'lib/databasedotcom/convenience/base.rb', line 57

def self.included(base)
  base.send(:include, InstanceMethods)
  base.send(:extend, ClassMethods)
end