class Plugin::Photo::Photo

Public Class Methods

[](uri) click to toggle source
# File core/plugin/photo/model/photo.rb, line 13
def self.[](uri)
  case uri
  when self
    uri
  when URI, Addressable::URI, Diva::URI, String
    photos[uri.to_s.hash] ||= new(perma_link: uri)
  end
end
new(*params) click to toggle source
Calls superclass method Diva::Model::PhotoMixin.new
# File core/plugin/photo/model/photo.rb, line 22
def initialize(*params)
  super
  self.class.photos[uri.to_s.hash] = self
end
photos() click to toggle source
# File core/plugin/photo/model/photo.rb, line 9
def self.photos
  @photos ||= TimeLimitedStorage.new(Integer, self)
end