Skip to content

Commit

Permalink
resolve -> resolve_internal
Browse files Browse the repository at this point in the history
  • Loading branch information
xronos-i-am committed Jan 24, 2025
1 parent b9cacd5 commit 099ed52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/active_dry_deps/container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module ActiveDryDeps
class Container < Hash

def resolve(container_key)
def resolve_internal(container_key)
value = self[container_key]
value.is_a?(Proc) ? value.call : value
end
Expand Down
4 changes: 2 additions & 2 deletions lib/active_dry_deps/dependency.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def receiver_method_string
# end
def %<receiver_method_name>s(...)
(::ActiveDryDeps::Deps::CONTAINER.resolve("%<container_key_or_const_name>s") || %<container_key_or_const_name>s).%<method_name>s(...)
(::ActiveDryDeps::Deps::CONTAINER.resolve_internal("%<container_key_or_const_name>s") || %<container_key_or_const_name>s).%<method_name>s(...)
end
RUBY
{ container: true, method_call: false } => <<~RUBY,
Expand All @@ -93,7 +93,7 @@ def %<receiver_method_name>s(...)
# end
def %<receiver_method_name>s
::ActiveDryDeps::Deps::CONTAINER.resolve("%<container_key_or_const_name>s") || %<container_key_or_const_name>s
::ActiveDryDeps::Deps::CONTAINER.resolve_internal("%<container_key_or_const_name>s") || %<container_key_or_const_name>s
end
RUBY
{ container: false, method_call: true } => <<~RUBY,
Expand Down

0 comments on commit 099ed52

Please sign in to comment.