Sha256: c2f71e95a6ce62da8b933350ade3dc86ee333f781698c592f60e4048b21ea7ab

Contents?: true

Size: 653 Bytes

Versions: 7

Compression:

Stored size: 653 Bytes

Contents

# typed: strict
# frozen_string_literal: true

module LunchMoney
  # Holds global configuration options for this gem
  # @example api_key
  #   LunchMoney::Configuration.api_key
  #   => "your_api_key"
  #
  # @example validate_object_attributes
  #   LunchMoney::Configuration.validate_object_attributes
  #   => true
  class Configuration
    sig { returns(T.nilable(String)) }
    attr_accessor :api_key

    sig { returns(T::Boolean) }
    attr_accessor :validate_object_attributes

    sig { void }
    def initialize
      @api_key = ENV.fetch("LUNCHMONEY_TOKEN", nil)
      @validate_object_attributes = T.let(true, T::Boolean)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lunchmoney-1.4.0 lib/lunchmoney/configuration.rb
lunchmoney-1.2.0 lib/lunchmoney/configuration.rb
lunchmoney-1.1.2 lib/lunchmoney/configuration.rb
lunchmoney-1.1.1 lib/lunchmoney/configuration.rb
lunchmoney-1.1.0 lib/lunchmoney/configuration.rb
lunchmoney-1.0.0 lib/lunchmoney/configuration.rb
lunchmoney-0.10.0 lib/lunchmoney/configuration.rb