Class: HackernewsApi::User
- Inherits:
-
Object
- Object
- HackernewsApi::User
- Defined in:
- lib/hackernews_api/user.rb
Instance Attribute Summary collapse
-
#about ⇒ Object
readonly
Returns the value of attribute about.
-
#created ⇒ Object
readonly
Returns the value of attribute created.
-
#delay ⇒ Object
readonly
Returns the value of attribute delay.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#karma ⇒ Object
readonly
Returns the value of attribute karma.
-
#submitted ⇒ Object
readonly
Returns the value of attribute submitted.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(json) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(json) ⇒ User
Returns a new instance of User.
9 10 11 12 13 14 15 16 |
# File 'lib/hackernews_api/user.rb', line 9 def initialize json @id = json['id'] @aobut = json['about'] @create = json['created'] @delay = json['delay'] @karma = json['karma'] @submitted = json['submitted'] end |
Instance Attribute Details
#about ⇒ Object (readonly)
Returns the value of attribute about.
7 8 9 |
# File 'lib/hackernews_api/user.rb', line 7 def about @about end |
#created ⇒ Object (readonly)
Returns the value of attribute created.
7 8 9 |
# File 'lib/hackernews_api/user.rb', line 7 def created @created end |
#delay ⇒ Object (readonly)
Returns the value of attribute delay.
7 8 9 |
# File 'lib/hackernews_api/user.rb', line 7 def delay @delay end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/hackernews_api/user.rb', line 7 def id @id end |
#karma ⇒ Object (readonly)
Returns the value of attribute karma.
7 8 9 |
# File 'lib/hackernews_api/user.rb', line 7 def karma @karma end |
#submitted ⇒ Object (readonly)
Returns the value of attribute submitted.
7 8 9 |
# File 'lib/hackernews_api/user.rb', line 7 def submitted @submitted end |