Skip to content

Releases: Alexander-Senko/magic-decorator

v1.0.0

23 Nov 12:13
76aae6e
Compare
Choose a tag to compare

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

27 Oct 19:20
Compare
Choose a tag to compare

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

17 Oct 13:22
Compare
Choose a tag to compare

Changed

  • For almost any method called on a decorated object, both its result and yielded 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 decorate Enumerables.
    • enables splat operator: *decorated ,
    • enables double-splat operator: **decorated,
    • enumerating methods yield decorated items.

Full Changelog: v0.1.0...v0.2.0

v0.1.0

13 Oct 08:25
Compare
Choose a tag to compare

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