module ExtLogger::Common::ClassMethods

Public Instance Methods

rails_env() click to toggle source

Get the env

# File lib/ext_logger/common.rb, line 30
def rails_env
  self.valid_rails && ::Rails.env ? ::Rails.env : ENV_HASH[:dev]
end
rails_root() click to toggle source

Get the path of folder or rails project

# File lib/ext_logger/common.rb, line 26
def rails_root
  self.valid_rails && ::Rails.root ? ::Rails.root.to_s : ::Dir.pwd
end
valid_rails() click to toggle source

Validation the Rails object

# File lib/ext_logger/common.rb, line 21
def valid_rails
  defined?(::Rails)
end