Module: Rsodx
- Includes:
- Constants
- Defined in:
- lib/rsodx.rb,
lib/rsodx/base.rb,
lib/rsodx/boot.rb,
lib/rsodx/error.rb,
lib/rsodx/action.rb,
lib/rsodx/logger.rb,
lib/rsodx/router.rb,
lib/rsodx/cli/cli.rb,
lib/rsodx/connect.rb,
lib/rsodx/headers.rb,
lib/rsodx/request.rb,
lib/rsodx/service.rb,
lib/rsodx/version.rb,
lib/rsodx/contract.rb,
lib/rsodx/delegate.rb,
lib/rsodx/constants.rb,
lib/rsodx/presenter.rb,
lib/rsodx/controller.rb,
lib/rsodx/router_dsl.rb,
lib/rsodx/serializer.rb,
lib/rsodx/environment.rb,
lib/rsodx/configuration.rb,
lib/rsodx/logger_adapter.rb,
lib/rsodx/cli/commands/generators/migration.rb
Defined Under Namespace
Modules: Boot, Cli, Connect, Constants, Delegate, Environment, RouterDSL
Classes: Action, Base, Configuration, Contract, Controller, Error, Headers, Logger, LoggerAdapter, Presenter, Request, Router, Serializer, Service
Constant Summary
collapse
- RSODX_NAME =
'Rsodx'.freeze
- CLI =
Dry::CLI.new(::Rsodx::Cli)
- VERSION =
"0.1.1"
Constants included
from Constants
Constants::ASCII_LOGO, Constants::LOGO
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
20
21
22
|
# File 'lib/rsodx.rb', line 20
def config
@config
end
|
Class Method Details
22
23
24
25
|
# File 'lib/rsodx.rb', line 22
def configure
self.config ||= Configuration.new
yield(config)
end
|
.loader ⇒ Object
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# File 'lib/rsodx.rb', line 32
def self.loader
@loader ||= begin
loader = Zeitwerk::Loader.new
%w[
app/models
app/services
app/workers
app/presenters
app/serializers
app/controllers
app/lib
].each do |subdir|
path = File.join(project_root, subdir)
loader.push_dir(path) if Dir.exist?(path)
end
loader.enable_reloading
loader.setup
loader
end
end
|
.project_root ⇒ Object
28
29
30
|
# File 'lib/rsodx.rb', line 28
def self.project_root
@root ||= Dir.pwd
end
|
.reload! ⇒ Object
56
57
58
59
|
# File 'lib/rsodx.rb', line 56
def self.reload!
puts "🔄 Reloading..."
loader.reload
end
|