Class: Pocket::Author

Inherits:
Object
  • Object
show all
Defined in:
lib/pocket/author.rb

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Author

Returns a new instance of Author.



3
4
5
# File 'lib/pocket/author.rb', line 3

def initialize(response)
  @response = response
end

Instance Method Details

#idObject



7
8
9
# File 'lib/pocket/author.rb', line 7

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

#nameObject



11
12
13
# File 'lib/pocket/author.rb', line 11

def name
  response.fetch("name")
end

#urlObject



15
16
17
# File 'lib/pocket/author.rb', line 15

def url
  response.fetch("url")
end