Sha256: b415a4cf1e0681d7187d1057469de6840e6be06ae18e3346e1cf89ba4b9232e9

Contents?: true

Size: 392 Bytes

Versions: 29

Compression:

Stored size: 392 Bytes

Contents

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

    def label
      "Previews"
    end

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

    def type
      :preview_collection
    end

    def self.describe_as
      "previews"
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
lookbook-1.3.4 lib/lookbook/preview_collection.rb
lookbook-1.3.3 lib/lookbook/preview_collection.rb
lookbook-1.3.1 lib/lookbook/preview_collection.rb
lookbook-1.3.0 lib/lookbook/preview_collection.rb
lookbook-1.2.1 lib/lookbook/preview_collection.rb
lookbook-1.2.0 lib/lookbook/preview_collection.rb
lookbook-1.1.1 lib/lookbook/preview_collection.rb
lookbook-1.1.0 lib/lookbook/preview_collection.rb
lookbook-1.0.8 lib/lookbook/preview_collection.rb
lookbook-1.0.7 lib/lookbook/preview_collection.rb
lookbook-1.0.6 lib/lookbook/preview_collection.rb
lookbook-1.0.5 lib/lookbook/preview_collection.rb
lookbook-1.0.4 lib/lookbook/preview_collection.rb
lookbook-1.0.3 lib/lookbook/preview_collection.rb
lookbook-1.0.2 lib/lookbook/preview_collection.rb
lookbook-1.0.1 lib/lookbook/preview_collection.rb
lookbook-1.0.0 lib/lookbook/preview_collection.rb
lookbook-1.0.0.rc.3 lib/lookbook/preview_collection.rb
lookbook-1.0.0.rc.2 lib/lookbook/preview_collection.rb
lookbook-1.0.0.rc.1 lib/lookbook/preview_collection.rb