Class: Yammer::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/yammer/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_parsedObject (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_plainObject (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_typeObject (readonly)

Returns the value of attribute client_type.



3
4
5
# File 'lib/yammer/message.rb', line 3

def client_type
  @client_type
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/yammer/message.rb', line 3

def id
  @id
end

#message_typeObject (readonly)

Returns the value of attribute message_type.



3
4
5
# File 'lib/yammer/message.rb', line 3

def message_type
  @message_type
end

#replied_to_idObject (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_idObject (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_typeObject (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_idObject (readonly)

Returns the value of attribute thread_id.



3
4
5
# File 'lib/yammer/message.rb', line 3

def thread_id
  @thread_id
end

#urlObject (readonly)

Returns the value of attribute url.



3
4
5
# File 'lib/yammer/message.rb', line 3

def url
  @url
end

#web_urlObject (readonly)

Returns the value of attribute web_url.



3
4
5
# File 'lib/yammer/message.rb', line 3

def web_url
  @web_url
end