Class: BadPigeon::User
- Inherits:
-
Object
- Object
- BadPigeon::User
- 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
-
#json ⇒ Object
readonly
Returns the value of attribute json.
Instance Method Summary collapse
-
#initialize(json) ⇒ User
constructor
A new instance of User.
- #legacy ⇒ Object
- #screen_name ⇒ Object
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
#json ⇒ Object (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
#legacy ⇒ Object
14 15 16 |
# File 'lib/bad_pigeon/models/user.rb', line 14 def legacy json['legacy'] end |
#screen_name ⇒ Object
18 19 20 |
# File 'lib/bad_pigeon/models/user.rb', line 18 def screen_name legacy['screen_name'] end |