Sha256: ad5bc8aa7650ea931d7e23f3705bf09acca56ff704f06883ecc5c05e45cd0a97

Contents?: true

Size: 447 Bytes

Versions: 8

Compression:

Stored size: 447 Bytes

Contents

class TestModel
  def to_param
    object_id
  end

  def change_frequency
    'monthly'
  end

  def priority
    0.8
  end

  class << self
    def count_for_sitemap
      self.find_for_sitemap.size
    end

    def num_items
      10
    end

    def find_for_sitemap(options={})
      instances = []
      num_times = options.delete(:limit) || self.num_items
      num_times.times { instances.push(self.new) }
      instances
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
alexrabarts-big_sitemap-0.3.0 test/fixtures/test_model.rb
alexrabarts-big_sitemap-0.3.1 test/fixtures/test_model.rb
alexrabarts-big_sitemap-0.3.2 test/fixtures/test_model.rb
alexrabarts-big_sitemap-0.3.3 test/fixtures/test_model.rb
alexrabarts-big_sitemap-0.3.4 test/fixtures/test_model.rb
alexrabarts-big_sitemap-0.4.0 test/fixtures/test_model.rb
pj_nitin-big_sitemap-0.3.1 test/fixtures/test_model.rb
pj_nitin-big_sitemap-0.3.2 test/fixtures/test_model.rb