class FactoryBot::Decorator::AttributeHash
Public Class Methods
Source
# File lib/factory_bot/decorator/attribute_hash.rb, line 4 def initialize(component, attributes = []) super(component) @attributes = attributes end
Calls superclass method
FactoryBot::Decorator::new
Public Instance Methods
Source
# File lib/factory_bot/decorator/attribute_hash.rb, line 9 def attributes @attributes.each_with_object({}) do |attribute_name, result| result[attribute_name] = @component.send(attribute_name) end end