lib/alba/many.rb in alba-0.2.0 vs lib/alba/many.rb in alba-0.3.0

- old
+ new

@@ -7,10 +7,10 @@ @block = block raise ArgumentError, 'resource or block is required' if @resource.nil? && @block.nil? end def to_hash(target) - objects = target.__send__(@name) + objects = target.public_send(@name) @resource ||= resource_class objects.map { |o| @resource.new(o).to_hash } end private