module EnvVar
Constants
- VERSION
Public Class Methods
I(name)
click to toggle source
# File lib/env_var.rb, line 16 def I(name) I[name] end
Also aliased as: i
W(name)
click to toggle source
# File lib/env_var.rb, line 22 def W(name) W[name] end
Also aliased as: w
[](name)
click to toggle source
# File lib/env_var.rb, line 36 def [](name) ENV[name] end
disabled?(name)
click to toggle source
# File lib/env_var.rb, line 32 def disabled?(name) %w[0 false off].freeze.include?(self[name]) end
enabled?(name)
click to toggle source
# File lib/env_var.rb, line 28 def enabled?(name) %w[1 true on].freeze.include?(self[name]) end
method_missing(name, *args)
click to toggle source
Calls superclass method
# File lib/env_var.rb, line 40 def method_missing(name, *args) return ENV.public_send(name, *args) if ENV.respond_to?(name) super end
respond_to_missing?(name, all)
click to toggle source
Calls superclass method
# File lib/env_var.rb, line 45 def respond_to_missing?(name, all) ENV.respond_to?(name, all) || super end