Sha256: 7b54e6115099cfb34f64dff9861678b9f85862dbed60e572afe763f0ea62b037

Contents?: true

Size: 365 Bytes

Versions: 6

Compression:

Stored size: 365 Bytes

Contents

require 'attr_extras'

# https://github.com/barsoom/attr_extras/issues/18
module AttrExtrasExt

  def self.mixin
    self::Mixin
  end

  module Mixin

    def attr_accessor_initialize(*names, &block)
      attr_initialize(*names, &block)
      attr_accessor(*AttrExtras::Utils.flat_names(names))
    end

  end

end

class Module
  include AttrExtrasExt.mixin
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
locomotivecms_common-0.4.0 lib/locomotive/common/attr_extras_ext.rb
locomotivecms_common-0.3.1 lib/locomotive/common/attr_extras_ext.rb
locomotivecms_common-0.3.0 lib/locomotive/common/attr_extras_ext.rb
locomotivecms_common-0.2.0 lib/locomotive/common/attr_extras_ext.rb
locomotivecms_common-0.1.0 lib/locomotive/common/attr_extras_ext.rb
locomotivecms_common-0.0.5 lib/locomotive/common/attr_extras_ext.rb