Sha256: 86a25efb484d30560aff89916c197c4da5f2a4d3506be86cee4f1fec28a520d1
Contents?: true
Size: 622 Bytes
Versions: 13
Compression:
Stored size: 622 Bytes
Contents
# frozen_string_literal: true module Tana module Configuration # Handles loading of configuration with environment defaults. class Loader def initialize model = Content, environment: ENV @model = model @environment = environment end def call model[ accept: environment.fetch("TANA_API_ACCEPT", "application/json"), token: environment["TANA_API_TOKEN"], url: environment.fetch("TANA_API_URL", "https://europe-west1-tagr-prod.cloudfunctions.net") ] end private attr_reader :model, :environment end end end
Version data entries
13 entries across 13 versions & 1 rubygems