Class: Pocket::Author
- Inherits:
-
Object
- Object
- Pocket::Author
- Defined in:
- lib/pocket/author.rb
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(response) ⇒ Author
constructor
A new instance of Author.
- #name ⇒ Object
- #url ⇒ Object
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
#id ⇒ Object
7 8 9 |
# File 'lib/pocket/author.rb', line 7 def id Integer(response.fetch("author_id")) end |
#name ⇒ Object
11 12 13 |
# File 'lib/pocket/author.rb', line 11 def name response.fetch("name") end |
#url ⇒ Object
15 16 17 |
# File 'lib/pocket/author.rb', line 15 def url response.fetch("url") end |