module MultiSync::Environment

Public Instance Methods

env()
Alias for: environment
env=(e)
Alias for: environment=
env?(e)
Alias for: environment?
environment() click to toggle source

Retrieves the current MultiSync environment

@return [String] the current environment

# File lib/multi_sync/environment.rb, line 6
def environment
  @environment ||= ENV['MULTI_SYNC_ENV'] || ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development'
end
Also aliased as: env
environment=(e) click to toggle source

Sets the current MultiSync environment

@param [String|Symbol] env the environment symbol

# File lib/multi_sync/environment.rb, line 14
def environment=(e)
  @environment = e.to_s
end
Also aliased as: env=
environment?(e) click to toggle source

Determines if we are in a particular environment

@return [Boolean] true if current environment matches, false otherwise

# File lib/multi_sync/environment.rb, line 22
def environment?(e)
  environment == e.to_s
end
Also aliased as: env?