Releases: Alexander-Senko/magic-decorator
Releases · Alexander-Senko/magic-decorator
v1.0.0
This release marks the gem to be stable enough.
Note
Nothing notable was changed in the code since the last version.
Documentation
- Added a section about overriding the defaults.
- Added a section about testing.
Full Changelog: v0.3.0...v1.0.0
v0.3.0
Added
- Improved extendability: one may override
Magic::Decoratable#decorator_base
to be used for lookups. Magic::Decoratable.classes
for all the decoratables.
Fixed
- Failures on double decoration attempts.
Full Changelog: v0.2.0...v0.3.0
v0.2.0
Changed
- For almost any method called on a decorated object, both its result and
yield
ed arguments get decorated.
Some methods aren’t meant to be decorated though:deconstruct
&deconstruct_keys
for pattern matching,- converting methods: those starting with
to_
, - system methods: those starting with
_
.
Added
Magic::Decorator::Base.undecorated
to exclude methods from being decorated automagically.
Default decorators
EnumerableDecorator
to decorateEnumerable
s.- enables splat operator:
*decorated
, - enables double-splat operator:
**decorated
, - enumerating methods yield decorated items.
- enables splat operator:
Full Changelog: v0.1.0...v0.2.0
v0.1.0
Added
Magic::Decorator::Base
— a basic decorator class.Magic::Decoratable
to be included in decoratable classes.
-#decorate
,
-#decorate!
,
-#decorated
,
-#decorated?
.
Full Changelog: https://github.com/Alexander-Senko/magic-decorator/commits/v0.1.0