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

#initializeConfiguration

Returns a new instance of Configuration.



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_keyObject

Returns the value of attribute api_key.



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

def api_key
  @api_key
end

#validate_object_attributesObject

Returns the value of attribute validate_object_attributes.



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

def validate_object_attributes
  @validate_object_attributes
end