Sha256: 1307c035cd9e1b1743d8d1081eb934977564ebb25190060f378173b080ebdf5d

Contents?: true

Size: 306 Bytes

Versions: 6

Compression:

Stored size: 306 Bytes

Contents

module Pocket
  class Author
    def initialize(response)
      @response = response
    end

    def id
      Integer(response.fetch("author_id"))
    end

    def name
      response.fetch("name")
    end

    def url
      response.fetch("url")
    end

    private

    attr_reader :response
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pocket-ruby-0.6.0 lib/pocket/author.rb
pocket-ruby-0.5.0 lib/pocket/author.rb
pocket-ruby-0.4.0 lib/pocket/author.rb
pocket-ruby-0.3.0 lib/pocket/author.rb
pocket-ruby-0.2.1 lib/pocket/author.rb
pocket-ruby-0.2.0 lib/pocket/author.rb