Module: UmbrellioUtils

Extended by:
UmbrellioUtils
Included in:
UmbrellioUtils
Defined in:
lib/umbrellio_utils.rb,
lib/umbrellio_utils/misc.rb,
lib/umbrellio_utils/cards.rb,
lib/umbrellio_utils/store.rb,
lib/umbrellio_utils/vault.rb,
lib/umbrellio_utils/checks.rb,
lib/umbrellio_utils/random.rb,
lib/umbrellio_utils/control.rb,
lib/umbrellio_utils/parsing.rb,
lib/umbrellio_utils/version.rb,
lib/umbrellio_utils/database.rb,
lib/umbrellio_utils/rounding.rb,
lib/umbrellio_utils/constants.rb,
lib/umbrellio_utils/passwords.rb,
lib/umbrellio_utils/formatting.rb,
lib/umbrellio_utils/http_client.rb,
lib/umbrellio_utils/request_wrapper.rb,
lib/umbrellio_utils/semantic_logger/tiny_json_formatter.rb

Defined Under Namespace

Modules: Cards, Checks, Constants, Control, Database, Formatting, Jobs, Misc, Parsing, Passwords, Random, Rounding, SemanticLogger, Store, Vault Classes: HTTPClient, RequestWrapper

Constant Summary collapse

GLOBAL_MUTEX =
Mutex.new
VERSION =
"1.5.5"

Instance Method Summary collapse

Instance Method Details

#configObject

rubocop:disable Style/ClassVars



16
17
18
19
20
21
22
# File 'lib/umbrellio_utils.rb', line 16

def config
  synchronize do
    @@config ||= Struct
      .new(:store_table_name, :http_client_name, keyword_init: true)
      .new(**default_settings)
  end
end

#configureObject

rubocop:enable Style/ClassVars



26
27
28
# File 'lib/umbrellio_utils.rb', line 26

def configure
  synchronize { yield config }
end

#extend_util!(module_name, &block) ⇒ Object



30
31
32
33
# File 'lib/umbrellio_utils.rb', line 30

def extend_util!(module_name, &block)
  const = UmbrellioUtils.const_get(module_name)
  synchronize { const.class_eval(&block) }
end

#included(othermod) ⇒ Object



10
11
12
13
# File 'lib/umbrellio_utils.rb', line 10

def included(othermod)
  super
  othermod.extend(self)
end