Sha256: 8d144966f6b87f324782b38e6ccd8a277f2d3f3ed1c28e61b34702c842acbd6c

Contents?: true

Size: 303 Bytes

Versions: 2

Compression:

Stored size: 303 Bytes

Contents

module Pocket
  class Image
    attr_reader :response

    def initialize(response)
      @response = response
    end

    def src
      response.fetch("src")
    end

    def caption
      response.fetch("caption")
    end

    def image_id
      Integer(response.fetch("image_id"))
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pocket-ruby-0.6.0 lib/pocket/image.rb
pocket-ruby-0.5.0 lib/pocket/image.rb