Module: LunchMoney

Defined in:
lib/lunchmoney/errors.rb,
lib/lunchmoney.rb,
lib/lunchmoney/api.rb,
lib/lunchmoney/version.rb,
lib/lunchmoney/calls/base.rb,
lib/lunchmoney/calls/tags.rb,
lib/lunchmoney/exceptions.rb,
lib/lunchmoney/validators.rb,
lib/lunchmoney/calls/users.rb,
lib/lunchmoney/objects/tag.rb,
lib/lunchmoney/calls/assets.rb,
lib/lunchmoney/calls/crypto.rb,
lib/lunchmoney/objects/data.rb,
lib/lunchmoney/objects/user.rb,
lib/lunchmoney/calls/budgets.rb,
lib/lunchmoney/configuration.rb,
lib/lunchmoney/objects/asset.rb,
lib/lunchmoney/objects/split.rb,
lib/lunchmoney/objects/budget.rb,
lib/lunchmoney/objects/config.rb,
lib/lunchmoney/objects/crypto.rb,
lib/lunchmoney/objects/object.rb,
lib/lunchmoney/calls/categories.rb,
lib/lunchmoney/objects/category.rb,
lib/lunchmoney/objects/tag_base.rb,
lib/lunchmoney/calls/transactions.rb,
lib/lunchmoney/objects/crypto_base.rb,
lib/lunchmoney/objects/transaction.rb,
lib/lunchmoney/calls/plaid_accounts.rb,
lib/lunchmoney/objects/plaid_account.rb,
lib/lunchmoney/objects/child_category.rb,
lib/lunchmoney/calls/recurring_expenses.rb,
lib/lunchmoney/objects/transaction_base.rb,
lib/lunchmoney/objects/child_transaction.rb,
lib/lunchmoney/objects/recurring_expense.rb,
lib/lunchmoney/objects/update_transaction.rb,
lib/lunchmoney/objects/recurring_expense_base.rb,
lib/lunchmoney/objects/transaction_modification_base.rb

Overview

typed: strict frozen_string_literal: true

Defined Under Namespace

Modules: Calls, Objects, Validators Classes: Api, Configuration, Errors, Exception, InvalidApiKey, InvalidObjectAttribute, InvalidQueryParameter, MissingArgument

Constant Summary collapse

LOCK =

Lock used to avoid config conflicts

T.let(Mutex.new, Mutex)
VERSION =

Current version of the gem

"1.1.0"

Class Method Summary collapse

Class Method Details

.configurationObject



44
45
46
47
# File 'lib/lunchmoney.rb', line 44

def configuration
  @configuration = T.let(nil, T.nilable(LunchMoney::Configuration)) unless defined?(@configuration)
  @configuration || LOCK.synchronize { @configuration = LunchMoney::Configuration.new }
end

.configure {|configuration| ... } ⇒ Object

Yields:



39
40
41
# File 'lib/lunchmoney.rb', line 39

def configure(&block)
  yield(configuration)
end

.validate_object_attributes?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/lunchmoney.rb', line 50

def validate_object_attributes?
  configuration.validate_object_attributes
end