class BotMob::Environment

## BotMob::Environment

Provide convenience methods for tracking current BotMob runtime environment. Set using the environment variable: `ENV`

Public Class Methods

new(env = nil) click to toggle source
# File lib/bot_mob/environment.rb, line 8
def initialize(env = nil)
  @env = env || 'development'
end

Public Instance Methods

method_missing(method_name, *args) click to toggle source
Calls superclass method
# File lib/bot_mob/environment.rb, line 20
def method_missing(method_name, *args)
  environment = method_name.to_s[/(.*)\?$/, 1]
  environment ? @env == environment : super
end
respond_to_missing?(method_name, include_private = false) click to toggle source
Calls superclass method
# File lib/bot_mob/environment.rb, line 16
def respond_to_missing?(method_name, include_private = false)
  method_name.to_s[/(.*)\?$/, 1] || super
end
to_s() click to toggle source
# File lib/bot_mob/environment.rb, line 12
def to_s
  @env
end