dim icon indicating copy to clipboard operation
dim copied to clipboard

register_env method should accept a block

Open subelsky opened this issue 8 years ago • 0 comments

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

subelsky avatar May 05 '17 16:05 subelsky