Skip to content

Commit 5f9edf5

Browse files
require all lib files after module definition
1 parent ce03d81 commit 5f9edf5

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,17 @@ Descendants of a parent, into which initializer logic has already been imported,
6565
You can use both providers for a different services:
6666

6767
```ruby
68-
6968
# Types is a namespace for all types, defined by smart_types.
7069
class FirstService < Resol::Service
71-
inject_initializer :smartcore
70+
inject_initializer :smartcore_injector
7271

7372
param :first, Types::String
7473
param :second, Types::Integer
7574
end
7675

7776
# Types is a namespace for all types, defined by dry-types.
7877
class SecondService < Resol::Service
79-
inject_initializer :dry
78+
inject_initializer :dry_injector
8079

8180
param :first, Types::Strict::String
8281
param :second, Types::Strict::Integer
@@ -86,6 +85,8 @@ end
8685
Both initializers support inheritance. And base features for initialization flow
8786
like default value, arguments accessors visibility level, coercible attributes and so on.
8887

88+
List of all supported initializers you can see at `DependencyContainer` definition.
89+
8990
#### Return a result
9091

9192
**Note** – calling `success!`/`fail!` methods interrupts `call` method execution.

lib/resol/result.rb

+12
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,16 @@ def bind = self
8484

8585
alias fmap bind
8686
end
87+
88+
# TODO: Should be in a module, which includes in classes.
89+
# Example;
90+
# rubocop:disable Naming/MethodName
91+
def Success(...)
92+
Success.new(...)
93+
end
94+
95+
def Failure(...)
96+
Failure.new(...)
97+
end
98+
# rubocop:enable Naming/MethodName
8799
end

0 commit comments

Comments
 (0)