class FactoryBot::Decorator::AttributeHash
Public Class Methods
new(component, attributes = [])
click to toggle source
Calls superclass method
FactoryBot::Decorator::new
# File lib/factory_bot/decorator/attribute_hash.rb, line 4 def initialize(component, attributes = []) super(component) @attributes = attributes end
Public Instance Methods
attributes()
click to toggle 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