Sha256: 5923eda83bcbcd66368db58c0626ac7573492c8392c5b69cf2528ad0cd34fe3a
Contents?: true
Size: 369 Bytes
Versions: 1
Compression:
Stored size: 369 Bytes
Contents
module Gleborator class BaseDecorator attr_reader :object def initialize(object) @object = object end def self.decorate_collection(collection) collection.map {|object| new(object) } end def self.delegate(*methods) options = methods.extract_options! super *methods, options.reverse_merge(to: :object) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gleborator-0.1.1.10 | lib/gleborator/base_decorator.rb |