Class: SakaiInfo::GenericThread

Inherits:
SakaiObject show all
Defined in:
lib/sakai-info/generic_message.rb

Direct Known Subclasses

ForumThread

Instance Attribute Summary

Attributes inherited from SakaiObject

#id

Class Method Summary collapse

Methods inherited from SakaiObject

all_serializations, #dbrow_only_serialization, #dbrow_serialization, #default_serialization, descendants, #object_type_serialization, #serialize, #shell_serialization, #summary_serialization, #to_csv, #to_json, #to_yaml

Class Method Details

.typesObject



52
53
54
55
56
57
58
59
# File 'lib/sakai-info/generic_message.rb', line 52

def self.types
  {
    "TO" => "Generic Thread",
    "PT" => "Private Thread",
    "OT" => "Open Thread",
    "DT" => "Discussion Thread"
  }
end

.valid_message_type?(mt) ⇒ Boolean

Returns:

  • (Boolean)


61
62
63
# File 'lib/sakai-info/generic_message.rb', line 61

def self.valid_message_type?(mt)
  GenericThread.types.keys.include?(mt)
end