module Resync::Client::Mixins::ListIndex
A resource container whose resources are, themselves, resource containers
Public Instance Methods
all_resources()
click to toggle source
Downloads and parses each resource list and returns a flattened enumeration of all resources in each contained list. Each contained list is only downloaded as needed, and only downloaded once. @return [Enumerator::Lazy<Resync::Resource>] the flattened enumeration of resources
# File lib/resync/client/mixins/list_index.rb, line 15 def all_resources @resource_lists ||= {} resources.lazy.flat_map do |r| @resource_lists[r] ||= r.get_and_parse @resource_lists[r].resources end end