Class: Yammer::Message
- Inherits:
-
Object
- Object
- Yammer::Message
- Defined in:
- lib/yammer/message.rb
Instance Attribute Summary collapse
-
#body_parsed ⇒ Object
readonly
Returns the value of attribute body_parsed.
-
#body_plain ⇒ Object
readonly
Returns the value of attribute body_plain.
-
#client_type ⇒ Object
readonly
Returns the value of attribute client_type.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#message_type ⇒ Object
readonly
Returns the value of attribute message_type.
-
#replied_to_id ⇒ Object
readonly
Returns the value of attribute replied_to_id.
-
#sender_id ⇒ Object
readonly
Returns the value of attribute sender_id.
-
#sender_type ⇒ Object
readonly
Returns the value of attribute sender_type.
-
#thread_id ⇒ Object
readonly
Returns the value of attribute thread_id.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#web_url ⇒ Object
readonly
Returns the value of attribute web_url.
Instance Method Summary collapse
-
#initialize(m) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(m) ⇒ Message
Returns a new instance of Message.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/yammer/message.rb', line 7 def initialize(m) @id = m['id'] @url = m['url'] @web_url = m['web_url'] @replied_to_id = m['replied_to_id'] @thread_id = m['thread_id'] @body_plain = m['body']['plain'] @body_parsed = m['body']['parsed'] @message_type = m['message_type'] @client_type = m['client_type'] @sender_id = m['sender_id'] @sender_type = m['sender_type'] begin @created_at = m['created_at'] rescue ArgumentError => e @created_at = nil end end |
Instance Attribute Details
#body_parsed ⇒ Object (readonly)
Returns the value of attribute body_parsed.
3 4 5 |
# File 'lib/yammer/message.rb', line 3 def body_parsed @body_parsed end |
#body_plain ⇒ Object (readonly)
Returns the value of attribute body_plain.
3 4 5 |
# File 'lib/yammer/message.rb', line 3 def body_plain @body_plain end |
#client_type ⇒ Object (readonly)
Returns the value of attribute client_type.
3 4 5 |
# File 'lib/yammer/message.rb', line 3 def client_type @client_type end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/yammer/message.rb', line 3 def id @id end |
#message_type ⇒ Object (readonly)
Returns the value of attribute message_type.
3 4 5 |
# File 'lib/yammer/message.rb', line 3 def @message_type end |
#replied_to_id ⇒ Object (readonly)
Returns the value of attribute replied_to_id.
3 4 5 |
# File 'lib/yammer/message.rb', line 3 def replied_to_id @replied_to_id end |
#sender_id ⇒ Object (readonly)
Returns the value of attribute sender_id.
3 4 5 |
# File 'lib/yammer/message.rb', line 3 def sender_id @sender_id end |
#sender_type ⇒ Object (readonly)
Returns the value of attribute sender_type.
3 4 5 |
# File 'lib/yammer/message.rb', line 3 def sender_type @sender_type end |
#thread_id ⇒ Object (readonly)
Returns the value of attribute thread_id.
3 4 5 |
# File 'lib/yammer/message.rb', line 3 def thread_id @thread_id end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/yammer/message.rb', line 3 def url @url end |
#web_url ⇒ Object (readonly)
Returns the value of attribute web_url.
3 4 5 |
# File 'lib/yammer/message.rb', line 3 def web_url @web_url end |