Class: Ghub::Configuration::Loader
- Inherits:
-
Object
- Object
- Ghub::Configuration::Loader
- Defined in:
- lib/ghub/configuration/loader.rb
Overview
Handles loading of configuration with environment defaults.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(model = Content, environment: ENV) ⇒ Loader
constructor
A new instance of Loader.
Constructor Details
Instance Method Details
#call ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/ghub/configuration/loader.rb', line 16 def call model[ accept: environment.fetch("GITHUB_API_ACCEPT", "application/vnd.github+json"), paginate: environment.fetch("GITHUB_API_PAGINATE", "false").to_bool, token: environment["GITHUB_API_TOKEN"], url: environment.fetch("GITHUB_API_URL", "https://api.github.com") ] end |