lib/dry/effects/effects/resolve.rb in dry-effects-0.3.0 vs lib/dry/effects/effects/resolve.rb in dry-effects-0.3.1
- old
+ new
@@ -1,20 +1,15 @@
# frozen_string_literal: true
-require "dry/effects/effect"
-require "dry/effects/constructors"
-
module Dry
module Effects
module Effects
class Resolve < ::Module
- DependencyNameInvalid = Class.new(StandardError)
+ DependencyNameInvalid = ::Class.new(StandardError)
VALID_NAME = /([a-z_][a-zA-Z_0-9]*)$/.freeze
Resolve = Effect.new(type: :resolve)
-
- Constructors.register(:Resolve) { Resolve.(_1) }
def initialize(*keys, **aliases)
super()
keys_aliased = keys.map { name_for(_1) }.zip(keys)