Class: USaidWat::Service::RedditService

Inherits:
Object
  • Object
show all
Defined in:
lib/usaidwat/service.rb

Instance Method Summary collapse

Instance Method Details

#user(username) ⇒ Object



6
7
8
9
# File 'lib/usaidwat/service.rb', line 6

def user(username)
  data = %w{about comments submitted}.reduce({}) { |memo, obj| memo.update(obj.to_sym =>  get_page(username, obj)) }
  USaidWat::Thing::User.new(username, data[:about], data[:comments], data[:submitted])
end