Skip to content

v0.7.2

Compare
Choose a tag to compare
@flash-gordon flash-gordon released this 09 Jul 15:33
v0.7.2
13d4136

v0.7.2 - 2019-07-09

Added

  • .resolve accepts an optional fallback block, similar to how Hash#fetch works (flash-gordon)
    container.resolve('missing_key') { :fallback } # => :fallback
  • .decorate can (again) work with static values. Also, it can take a block instead of with (flash-gordon)
    container.register('key', 'value')
    container.decorate('key') { |v| "<'#{v}'>" }
    container.resolve('key') # => "<'value'>"

Compare v0.7.1...0.7.2