Skip to content

register_env method should accept a block #8

@subelsky

Description

@subelsky

Dim::Container#register_env is missing a feature that #register has, the ability to provide a block for default values.

Right now you can do this:

container.register(:aws_access_key_id) do
  # some code that returns what the value of container.aws_access_key_id should be
end

but not this:

container.register_env(:aws_access_key_id) do
  # some code that returns what the value of container.xyz should be
end

This issue would get both methods in parity

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions