Sha256: e82165105267bd2552dd0cfdfd956020d36ae22d9ad0ba74cac25ef24a4ed4d1

Contents?: true

Size: 304 Bytes

Versions: 25

Compression:

Stored size: 304 Bytes

Contents

module Lookbook
  class PreviewCollection < Collection
    def id
      generate_id("preview-collection", lookup_path || "root")
    end

    def find_example(path)
      Lookbook::PreviewExample.all.find { |e| e.lookup_path == path }
    end

    def self.describe_as
      "previews"
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
lookbook-0.9.8 lib/lookbook/preview_collection.rb
lookbook-0.9.7 lib/lookbook/preview_collection.rb
lookbook-0.9.6 lib/lookbook/preview_collection.rb
lookbook-0.9.5 lib/lookbook/preview_collection.rb
lookbook-0.9.4 lib/lookbook/preview_collection.rb
lookbook-0.9.3 lib/lookbook/preview_collection.rb
lookbook-0.9.2 lib/lookbook/preview_collection.rb
lookbook-0.9.1 lib/lookbook/preview_collection.rb
lookbook-0.9.0 lib/lookbook/preview_collection.rb
lookbook-0.8.3 lib/lookbook/preview_collection.rb
lookbook-0.8.2 lib/lookbook/preview_collection.rb
lookbook-0.8.1 lib/lookbook/preview_collection.rb
lookbook-0.8.0 lib/lookbook/preview_collection.rb
lookbook-0.8.0.beta.0 lib/lookbook/preview_collection.rb
lookbook-0.7.4 lib/lookbook/preview_collection.rb
lookbook-0.7.3 lib/lookbook/preview_collection.rb
lookbook-0.7.2 lib/lookbook/preview_collection.rb
lookbook-0.7.2.beta.5 lib/lookbook/preview_collection.rb
lookbook-0.7.2.beta.4 lib/lookbook/preview_collection.rb
lookbook-0.7.2.beta.3 lib/lookbook/preview_collection.rb