Sha256: 065ae91848f3be5352a95b1ddeb17e9b4cfc3fb952262098b0202deb18a7b953

Contents?: true

Size: 377 Bytes

Versions: 6

Compression:

Stored size: 377 Bytes

Contents

module FactoryGirl
  class Decorator
    class AttributeHash < Decorator
      def initialize(component, attributes = [])
        super(component)
        @attributes = attributes
      end

      def attributes
        @attributes.each_with_object({}) do |attribute_name, result|
          result[attribute_name] = send(attribute_name)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
ffactory_girl-4.8.2 lib/factory_girl/decorator/attribute_hash.rb
factory_girl-4.9.0 lib/factory_girl/decorator/attribute_hash.rb
ffactory_girl-4.8.1 lib/factory_girl/decorator/attribute_hash.rb
factory_girl-4.8.1 lib/factory_girl/decorator/attribute_hash.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/factory_girl-4.8.0/lib/factory_girl/decorator/attribute_hash.rb
factory_girl-4.8.0 lib/factory_girl/decorator/attribute_hash.rb