Sha256: acbea60582019c0dc850a371b96a3c5c717e81a601fcae8e48920fb184dada10

Contents?: true

Size: 393 Bytes

Versions: 15

Compression:

Stored size: 393 Bytes

Contents

# encoding: utf-8
require 'active_support/inflector'
require 'attr_enumerable/attr_enumerable_helper'

# AttrEnumerable
module AttrEnumerable
  private
    def each_attr(attribute, method_name, *args, &block)
      collection.each do |element|
        super(method_name, *args) unless include_attr?(element, attribute)
        yield element.send(attribute)
      end
    end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
tbpgr_utils-0.0.151 lib/attr_enumerable/each_attr.rb
tbpgr_utils-0.0.150 lib/attr_enumerable/each_attr.rb
tbpgr_utils-0.0.149 lib/attr_enumerable/each_attr.rb
tbpgr_utils-0.0.148 lib/attr_enumerable/each_attr.rb
tbpgr_utils-0.0.147 lib/attr_enumerable/each_attr.rb
tbpgr_utils-0.0.146 lib/attr_enumerable/each_attr.rb
tbpgr_utils-0.0.145 lib/attr_enumerable/each_attr.rb
tbpgr_utils-0.0.144 lib/attr_enumerable/each_attr.rb
tbpgr_utils-0.0.143 lib/attr_enumerable/each_attr.rb
tbpgr_utils-0.0.142 lib/attr_enumerable/each_attr.rb
tbpgr_utils-0.0.141 lib/attr_enumerable/each_attr.rb
tbpgr_utils-0.0.140 lib/attr_enumerable/each_attr.rb
tbpgr_utils-0.0.139 lib/attr_enumerable/each_attr.rb
tbpgr_utils-0.0.138 lib/attr_enumerable/each_attr.rb
tbpgr_utils-0.0.137 lib/attr_enumerable/each_attr.rb