Class: Rito::Shard::Message

Inherits:
ApiBase
  • Object
show all
Defined in:
lib/rito/shard/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ApiBase

#attributes=, call_api, from_list, from_map, from_map_of_lists

Constructor Details

#initialize(attributes = {}) ⇒ Message

Returns a new instance of Message


11
12
13
14
# File 'lib/rito/shard/message.rb', line 11

def initialize(attributes = {})
	self.translations = Rito::Shard::Translation.from_list(attributes.delete('translations')) if attributes['translations']
	super
end

Instance Attribute Details

#authorObject

Returns the value of attribute author


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

def author
  @author
end

#contentObject

Returns the value of attribute content


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

def content
  @content
end

#created_atObject

Returns the value of attribute created_at


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

def created_at
  @created_at
end

#idObject

Returns the value of attribute id


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

def id
  @id
end

#severityObject

Returns the value of attribute severity


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

def severity
  @severity
end

#translationsObject

Returns the value of attribute translations


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

def translations
  @translations
end

#updated_atObject

Returns the value of attribute updated_at


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

def updated_at
  @updated_at
end