class TumblrThemer::PhotosetPhoto

Attributes

data[R]
html[R]

Public Class Methods

new(html, data, i=0) click to toggle source
# File lib/tumblr-themer/photoset_photo.rb, line 5
def initialize html, data, i=0
  @html = TumblrThemer::HtmlSnippet.new(html.dup) if html
  @data = data.dup
end

Public Instance Methods

photo_size(size) click to toggle source
# File lib/tumblr-themer/photoset_photo.rb, line 10
def photo_size size
  data.find {|p| p['width'] == size}||data.first
end