Class: HangoutsJsonParser::User
- Inherits:
-
Object
- Object
- HangoutsJsonParser::User
- Defined in:
- lib/hangouts_json_parser/user.rb
Overview
A chat user
Instance Attribute Summary collapse
-
#id ⇒ String
readonly
Google id of the user.
-
#name ⇒ String
readonly
In-chat name of the user.
Class Method Summary collapse
-
.from_participant_data(data) ⇒ Object
Creates a user from participant data.
Instance Method Summary collapse
-
#initialize(id, name) ⇒ User
constructor
A new instance of User.
-
#profile ⇒ String
The Google+ profile of the user.
Constructor Details
#initialize(id, name) ⇒ User
Returns a new instance of User.
14 15 16 17 |
# File 'lib/hangouts_json_parser/user.rb', line 14 def initialize id, name @id = id @name = name end |
Instance Attribute Details
#id ⇒ String (readonly)
Returns Google id of the user.
5 6 7 |
# File 'lib/hangouts_json_parser/user.rb', line 5 def id @id end |
#name ⇒ String (readonly)
Returns in-chat name of the user.
7 8 9 |
# File 'lib/hangouts_json_parser/user.rb', line 7 def name @name end |
Class Method Details
Instance Method Details
#profile ⇒ String
Returns the Google+ profile of the user.
10 11 12 |
# File 'lib/hangouts_json_parser/user.rb', line 10 def profile "https://plus.google.com/#{id}" end |