2024-03-27 09:16:00 -06:00
|
|
|
# `Providable` serves as an extension point for integrating multiple providers.
|
|
|
|
# For an example of a multi-provider, multi-concept implementation,
|
|
|
|
# see: https://github.com/maybe-finance/maybe/pull/561
|
|
|
|
|
|
|
|
module Providable
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
class_methods do
|
|
|
|
def exchange_rates_provider
|
2024-07-08 09:04:59 -04:00
|
|
|
api_key = ENV["SYNTH_API_KEY"]
|
|
|
|
|
|
|
|
if api_key.present?
|
|
|
|
Provider::Synth.new api_key
|
|
|
|
else
|
|
|
|
nil
|
|
|
|
end
|
2024-03-27 09:16:00 -06:00
|
|
|
end
|
2024-04-13 09:28:45 -04:00
|
|
|
|
|
|
|
def git_repository_provider
|
|
|
|
Provider::Github.new
|
|
|
|
end
|
2024-03-27 09:16:00 -06:00
|
|
|
end
|
|
|
|
end
|