Class: Line::Bot::Response::User::Profile
- Inherits:
-
Object
- Object
- Line::Bot::Response::User::Profile
- Defined in:
- lib/line/bot/response/user/profile.rb
Instance Attribute Summary collapse
-
#contacts ⇒ Object
readonly
Returns the value of attribute contacts.
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#display ⇒ Object
readonly
Returns the value of attribute display.
-
#start ⇒ Object
readonly
Returns the value of attribute start.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
Instance Method Summary collapse
- #create_contacts(contacts) ⇒ Object
-
#initialize(response) ⇒ Profile
constructor
A new instance of Profile.
Constructor Details
#initialize(response) ⇒ Profile
Returns a new instance of Profile.
11 12 13 14 15 16 17 18 19 |
# File 'lib/line/bot/response/user/profile.rb', line 11 def initialize(response) json = JSON.parse(response.body) @start = json['start'] @count = json['count'] @total = json['total'] @contacts = create_contacts(json['contacts']) || [] @display = json['display'] end |
Instance Attribute Details
#contacts ⇒ Object (readonly)
Returns the value of attribute contacts.
9 10 11 |
# File 'lib/line/bot/response/user/profile.rb', line 9 def contacts @contacts end |
#count ⇒ Object (readonly)
Returns the value of attribute count.
9 10 11 |
# File 'lib/line/bot/response/user/profile.rb', line 9 def count @count end |
#display ⇒ Object (readonly)
Returns the value of attribute display.
9 10 11 |
# File 'lib/line/bot/response/user/profile.rb', line 9 def display @display end |
#start ⇒ Object (readonly)
Returns the value of attribute start.
9 10 11 |
# File 'lib/line/bot/response/user/profile.rb', line 9 def start @start end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
9 10 11 |
# File 'lib/line/bot/response/user/profile.rb', line 9 def total @total end |