Class: Twttr::Model::User

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/twttr/model/user.rb

Overview

Instance Method Summary collapse

Constructor Details

#initialize(data, client = nil) ⇒ User

Returns a new instance of User.



13
14
15
16
# File 'lib/twttr/model/user.rb', line 13

def initialize(data, client = nil)
  @data = JSON.parse(data.to_json, object_class: OpenStruct)
  @client = client
end

Instance Method Details

#following(pagination_token: nil, &block) ⇒ Object



18
19
20
# File 'lib/twttr/model/user.rb', line 18

def following(pagination_token: nil, &block)
  client.following(id, pagination_token: pagination_token, &block)
end