Class: LunchMoney::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/lunchmoney/configuration.rb

Overview

Holds global configuration options for this gem

Examples:

api_key

LunchMoney::Configuration.api_key
=> "your_api_key"

validate_object_attributes

LunchMoney::Configuration.validate_object_attributes
=> true

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializevoid



21
22
23
24
# File 'lib/lunchmoney/configuration.rb', line 21

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

Instance Attribute Details

#api_keyString?

Returns:

  • (String, nil)


15
16
17
# File 'lib/lunchmoney/configuration.rb', line 15

def api_key
  @api_key
end

#validate_object_attributesBoolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/lunchmoney/configuration.rb', line 18

def validate_object_attributes
  @validate_object_attributes
end