Module: Figaro
- Extended by:
- Figaro
- Included in:
- Figaro
- Defined in:
- lib/figaro.rb,
lib/figaro/cli.rb,
lib/figaro/env.rb,
lib/figaro/error.rb,
lib/figaro/cli/task.rb,
lib/figaro/application.rb,
lib/figaro/cli/install.rb,
lib/figaro/rails/railtie.rb,
lib/figaro/cli/heroku_set.rb,
lib/figaro/rails/application.rb
Defined Under Namespace
Modules: ENV, Rails
Classes: Application, CLI, Error, MissingKey, MissingKeys, RailsNotInitialized
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#adapter ⇒ Object
14
15
16
|
# File 'lib/figaro.rb', line 14
def adapter
@adapter ||= Figaro::Application
end
|
#application ⇒ Object
18
19
20
|
# File 'lib/figaro.rb', line 18
def application
@application ||= adapter.new
end
|
Instance Method Details
#env ⇒ Object
10
11
12
|
# File 'lib/figaro.rb', line 10
def env
Figaro::ENV
end
|
#load ⇒ Object
22
23
24
|
# File 'lib/figaro.rb', line 22
def load
application.load
end
|
#require_keys(*keys) ⇒ Object
26
27
28
29
|
# File 'lib/figaro.rb', line 26
def require_keys(*keys)
missing_keys = keys.flatten - ::ENV.keys
raise MissingKeys.new(missing_keys) if missing_keys.any?
end
|