class Photish::Gallery::Collection

Attributes

config[R]

Public Class Methods

new(config) click to toggle source
Calls superclass method Photish::Plugin::Pluginable::new
# File lib/photish/gallery/collection.rb, line 15
def initialize(config)
  super
  @config = config
end

Public Instance Methods

all_url_parts() click to toggle source
# File lib/photish/gallery/collection.rb, line 32
def all_url_parts
  @all_url_parts ||= [[url_parts],
                      all_albums.map(&:url_parts),
                      all_photos.map(&:url_parts),
                      all_images.map(&:url_parts),
                      all_pages.map(&:url_parts),
                     ].flatten(1)
end
base_url_parts() click to toggle source
# File lib/photish/gallery/collection.rb, line 24
def base_url_parts
  [url_info.base].flatten.compact
end
image_extensions() click to toggle source
# File lib/photish/gallery/collection.rb, line 41
def image_extensions
  @image_extensions ||= Set.new(config.image_extensions)
end
name() click to toggle source
# File lib/photish/gallery/collection.rb, line 20
def name
  'Home'
end
plugin_type() click to toggle source
# File lib/photish/gallery/collection.rb, line 28
def plugin_type
  Plugin::Type::Collection
end
qualities() click to toggle source
# File lib/photish/gallery/collection.rb, line 45
def qualities
  @qualities ||= config.qualities
                       .map { |quality| OpenStruct.new(quality) }
end
url_info() click to toggle source
# File lib/photish/gallery/collection.rb, line 50
def url_info
  config.url
end

Private Instance Methods

album_class() click to toggle source
# File lib/photish/gallery/collection.rb, line 58
def album_class
  Album
end
parent() click to toggle source
# File lib/photish/gallery/collection.rb, line 66
def parent
  nil
end
url_end() click to toggle source
# File lib/photish/gallery/collection.rb, line 62
def url_end
  'index.html'
end