Module: Kirei

Extended by:
T::Sig
Defined in:
lib/kirei/app.rb,
lib/kirei.rb,
lib/kirei/model.rb,
lib/kirei/config.rb,
lib/kirei/helpers.rb,
lib/kirei/version.rb,
lib/kirei/controller.rb,
lib/kirei/routing/base.rb,
lib/kirei/routing/verb.rb,
lib/kirei/logging/level.rb,
lib/kirei/routing/route.rb,
lib/kirei/logging/logger.rb,
lib/kirei/logging/metric.rb,
lib/kirei/routing/router.rb,
lib/kirei/services/result.rb,
lib/kirei/services/runner.rb,
lib/kirei/model/class_methods.rb,
lib/kirei/errors/json_api_error.rb,
lib/kirei/routing/rack_env_type.rb,
lib/kirei/model/human_id_generator.rb,
lib/kirei/model/base_class_interface.rb,
lib/kirei/routing/nilable_hooks_type.rb,
lib/kirei/routing/rack_response_type.rb,
lib/kirei/errors/json_api_error_source.rb

Overview

typed: strict frozen_string_literal: true

Defined Under Namespace

Modules: Errors, Helpers, Logging, Model, Routing, Services Classes: App, Config, Controller

Constant Summary collapse

OJ_OPTIONS =

we don’t know what Oj does under the hood with the options hash, so don’t freeze it rubocop:disable Style/MutableConstant

T.let(
  {
    mode: :compat, # required to dump hashes with symbol-keys. @TODO(lud, 14.05.2024): drop this, and enforce String Keys?
    symbol_keys: false, # T::Struct.new works only with string-keys
  },
  T::Hash[Symbol, T.untyped],
)
GEM_ROOT =

rubocop:enable Style/MutableConstant

T.let(
  Gem::Specification.find_by_name("kirei").gem_dir,
  String,
)
VERSION =
"0.6.2"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



53
54
55
# File 'lib/kirei.rb', line 53

def configuration
  @configuration
end

Class Method Details

.configure {|T.must(configuration)| ... } ⇒ Object

Yields:



60
61
62
63
# File 'lib/kirei.rb', line 60

def configure(&_)
  self.configuration ||= Kirei::Config.new
  yield(T.must(configuration))
end