Sha256: b00f5e8771ce8c6e38bf07615d873d63571efa04420c43b33d48daf5a8d12e62

Contents?: true

Size: 599 Bytes

Versions: 6

Compression:

Stored size: 599 Bytes

Contents

require 'xing/snapshot/domain_helpers'

module Xing
  module Snapshot
    class SitePageSet
      include DomainHelpers

      def initialize(url)
        @url = domain(url)
      end

      def pages_to_visit
        @pages_to_visit ||= Page.published.where.not(type: "Page::Homepage")
      end

      def visit_pages(&block)
        STATIC_PATHS_FOR_SITEMAP.each do |path|
          yield(@url,path,Time.now)
        end

        pages_to_visit.each do |page|
          path = page_frontend_url(page.url_slug)
          yield(@url, path, page.updated_at)
        end
      end
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
xing-backend-1.0.0.pre.beta lib/xing/snapshot/site_page_set.rb
xing-backend-0.0.25 lib/xing/snapshot/site_page_set.rb
xing-backend-0.0.23 lib/xing/snapshot/site_page_set.rb
xing-backend-0.0.22 lib/xing/snapshot/site_page_set.rb
xing-backend-0.0.21 lib/xing/snapshot/site_page_set.rb
xing-backend-0.0.20 lib/xing/snapshot/site_page_set.rb