Module: EasyDecorator

Defined in:
lib/easy_decorator.rb,
lib/easy_decorator/errors.rb,
lib/easy_decorator/version.rb

Defined Under Namespace

Modules: ClassMethods Classes: Error, InvalidDecorator, InvalidSyntax

Constant Summary collapse

VERSION =
'0.2.1'.freeze

Class Method Summary collapse

Class Method Details

.included(base_klass) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/easy_decorator.rb', line 4

def self.included(base_klass)
  base_klass.extend(ClassMethods)
  base_klass.instance_variable_set(:@decorators, { method_buffer: [] })
  base_klass.define_method :wrapper do |&block|
    block
  end
end