class Marver::Factory::Creator
Public Class Methods
new(results)
click to toggle source
# File lib/marver/factories/creator.rb, line 7 def initialize(results) @results = results end
Public Instance Methods
build()
click to toggle source
# File lib/marver/factories/creator.rb, line 11 def build if @results.kind_of?(Array) @results.collect do |creator| create_creator(creator) end else create_creator(@results) end end
Private Instance Methods
create_creator(params)
click to toggle source
# File lib/marver/factories/creator.rb, line 22 def create_creator(params) attributes = CreatorAttributesMapper.new(params).map Marver::Creator.new(attributes) end