lib/rooftop/resource_links/collection.rb in rooftop-0.0.6 vs lib/rooftop/resource_links/collection.rb in rooftop-0.0.7.4

- old
+ new

@@ -1,12 +1,12 @@ module Rooftop module ResourceLinks class Collection < ::Array attr_reader :links - def initialize(links) + def initialize(links, klass=nil) links.each do |link_type,links| links.each do |link| - self << Rooftop::ResourceLinks::Link.new(link_type,link) + self << Rooftop::ResourceLinks::Link.new(link_type,link, klass) end end end # Find links by attribute. Assume there will only be one attribute in the search