Sha256: 5c516ec6422b891aa90b8fa2befd80db0277073779e350b49605f475e260856c
Contents?: true
Size: 389 Bytes
Versions: 2
Compression:
Stored size: 389 Bytes
Contents
module HackernewsApi class User def self.fetch id new(Client.fetch(:user, id)) end attr_reader :id, :about, :created, :delay, :karma, :submitted def initialize json @id = json['id'] @aobut = json['about'] @create = json['created'] @delay = json['delay'] @karma = json['karma'] @submitted = json['submitted'] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hackernews_api-0.0.2 | lib/hackernews_api/user.rb |
hackernews_api-0.0.1 | lib/hackernews_api/user.rb |