Sha256: a218f47c3948c29cc096225e9073c9e9a4f3ae5397063a395d57c315161cb268

Contents?: true

Size: 1.49 KB

Versions: 29

Compression:

Stored size: 1.49 KB

Contents

#remove_const "Flickr"

class Flickr
  def initialize(key)
  end

  class Photo
    def initialize(photoid)
      unless photoid == '31366117'
        raise 'Photo not found'
      end
    end

    def sizes
      [{"url"=>"http://www.flickr.com/photo_zoom.gne?id=31366117&size=sq", "height"=>"75", "source"=>"http://photos23.flickr.com/31366117_b1a791d68e_s.jpg", "label"=>"Square", "width"=>"75"}, {"url"=>"http://www.flickr.com/photo_zoom.gne?id=31366117&size=t", "height"=>"100", "source"=>"http://photos23.flickr.com/31366117_b1a791d68e_t.jpg", "label"=>"Thumbnail", "width"=>"67"}, {"url"=>"http://www.flickr.com/photo_zoom.gne?id=31366117&size=s", "height"=>"240", "source"=>"http://photos23.flickr.com/31366117_b1a791d68e_m.jpg", "label"=>"Small", "width"=>"160"}, {"url"=>"http://www.flickr.com/photo_zoom.gne?id=31366117&size=m", "height"=>"500", "source"=>"http://photos23.flickr.com/31366117_b1a791d68e.jpg", "label"=>"Medium", "width"=>"333"}, {"url"=>"http://www.flickr.com/photo_zoom.gne?id=31366117&size=l", "height"=>"1024", "source"=>"http://photos23.flickr.com/31366117_b1a791d68e_b.jpg", "label"=>"Large", "width"=>"683"}, {"url"=>"http://www.flickr.com/photo_zoom.gne?id=31366117&size=o", "height"=>"1536", "source"=>"http://photos23.flickr.com/31366117_b1a791d68e_o.jpg", "label"=>"Original", "width"=>"1024"}]
    end

    def description
      "This is Matz, Ruby's creator"
    end

    def title
      "Matz"
    end

    def url
      "http://www.flickr.com/users/scottlaird/31366117"
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
typo-5.0.3.98 test/mocks/test/flickr_mock.rb
typo-5.1.2 test/mocks/test/flickr_mock.rb
typo-5.1.1 test/mocks/test/flickr_mock.rb
typo-5.1.3 test/mocks/test/flickr_mock.rb
typo-5.1 test/mocks/test/flickr_mock.rb
typo-5.1.98 test/mocks/test/flickr_mock.rb
typo-5.2.98 test/mocks/test/flickr_mock.rb
typo-5.2 test/mocks/test/flickr_mock.rb
typo-5.3 test/mocks/test/flickr_mock.rb