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.0.0.beta.8 lib/lookbook/preview_collection.rb
lookbook-1.0.0.beta.7 lib/lookbook/preview_collection.rb
lookbook-1.0.0.beta.6 lib/lookbook/preview_collection.rb
lookbook-1.0.0.beta.5 lib/lookbook/preview_collection.rb
lookbook-1.0.0.beta.4 lib/lookbook/preview_collection.rb
lookbook-1.0.0.beta.3 lib/lookbook/preview_collection.rb
lookbook-1.0.0.beta.2 lib/lookbook/preview_collection.rb
lookbook-1.0.0.beta.1 lib/lookbook/preview_collection.rb
lookbook-1.0.0.beta.0 lib/lookbook/preview_collection.rb