Module: Gaskit
- Defined in:
- lib/gaskit.rb,
lib/gaskit/core.rb,
lib/gaskit/flow.rb,
lib/gaskit/error.rb,
lib/gaskit/logger.rb,
lib/gaskit/helpers.rb,
lib/gaskit/railtie.rb,
lib/gaskit/version.rb,
lib/gaskit/hookable.rb,
lib/gaskit/operation.rb,
lib/gaskit/boot/query.rb,
lib/gaskit/repository.rb,
lib/gaskit/flow_result.rb,
lib/gaskit/boot/service.rb,
lib/gaskit/configuration.rb,
lib/gaskit/hook_registry.rb,
lib/gaskit/operation_exit.rb,
lib/gaskit/operation_result.rb,
lib/gaskit/contract_registry.rb,
lib/generators/gaskit/operation/flow_generator.rb,
lib/generators/gaskit/operation/query_generator.rb,
lib/generators/gaskit/operation/service_generator.rb,
lib/generators/gaskit/operation/operation_generator.rb,
lib/generators/gaskit/operation/repository_generator.rb
Overview
Gaskit is a lightweight, extensible framework for building structured application operations.
It provides a clear architecture for defining, executing, and managing operations, supporting common patterns like services and queries, early exits, context-aware logging, and standardized result wrapping.
Defined Under Namespace
Modules: Generators, Helpers, Hookable Classes: Configuration, ContractError, ContractRegistry, Error, Flow, FlowResult, HookRegistry, Logger, Operation, OperationExit, OperationResult, Query, QueryResult, Railtie, Repository, ResultTypeError, Service, ServiceResult
Constant Summary collapse
- VERSION =
"0.1.1"
Class Method Summary collapse
-
.config {|configuration| ... } ⇒ void
Configures the Gaskit system.
-
.configuration ⇒ Gaskit::Configuration
Retrieves the global Gaskit configuration.
-
.contracts ⇒ Gaskit::ContractRegistry
Returns configuration.contracts.
-
.debug? ⇒ Boolean
Returns configuration.debug.
-
.hooks ⇒ Gaskit::HookRegistry
Returns configuration.hooks.
Class Method Details
.config {|configuration| ... } ⇒ void
This method returns an undefined value.
Configures the Gaskit system.
This yields the configuration instance, allowing you to modify settings such as logger, global context, log level, and formatting.
15 16 17 |
# File 'lib/gaskit/core.rb', line 15 def config yield(configuration) end |
.configuration ⇒ Gaskit::Configuration
Retrieves the global Gaskit configuration.
22 23 24 |
# File 'lib/gaskit/core.rb', line 22 def configuration @configuration ||= Configuration.new end |
.contracts ⇒ Gaskit::ContractRegistry
Returns configuration.contracts.
36 37 38 |
# File 'lib/gaskit/core.rb', line 36 def contracts configuration.contracts end |
.debug? ⇒ Boolean
Returns configuration.debug.
29 30 31 |
# File 'lib/gaskit/core.rb', line 29 def debug? Gaskit.configuration.debug end |
.hooks ⇒ Gaskit::HookRegistry
Returns configuration.hooks.
43 44 45 |
# File 'lib/gaskit/core.rb', line 43 def hooks configuration.hooks end |