Class: BadPigeon::User

Inherits:
Object
  • Object
show all
Defined in:
lib/bad_pigeon/models/user.rb

Overview

A model that represents a user with an interface matching that from the original ‘twitter` Ruby gem.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ User

Returns a new instance of User.



10
11
12
# File 'lib/bad_pigeon/models/user.rb', line 10

def initialize(json)
  @json = json
end

Instance Attribute Details

#jsonObject (readonly)

Returns the value of attribute json.



8
9
10
# File 'lib/bad_pigeon/models/user.rb', line 8

def json
  @json
end

Instance Method Details

#legacyObject



14
15
16
# File 'lib/bad_pigeon/models/user.rb', line 14

def legacy
  json['legacy']
end

#screen_nameObject



18
19
20
# File 'lib/bad_pigeon/models/user.rb', line 18

def screen_name
  legacy['screen_name']
end