Class: TopicSubtype
- Inherits:
-
Object
- Object
- TopicSubtype
- Includes:
- ActiveModel::Serialization
- Defined in:
- lib/topic_subtype.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
- .list ⇒ Object
- .moderator_warning ⇒ Object
- .notify_moderators ⇒ Object
- .notify_user ⇒ Object
- .pending_users_reminder ⇒ Object
- .register(name, options = {}) ⇒ Object
- .system_message ⇒ Object
- .user_to_user ⇒ Object
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(id, options) ⇒ TopicSubtype
constructor
A new instance of TopicSubtype.
Constructor Details
#initialize(id, options) ⇒ TopicSubtype
Returns a new instance of TopicSubtype.
8 9 10 11 |
# File 'lib/topic_subtype.rb', line 8 def initialize(id, ) @id = id @options = end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/topic_subtype.rb', line 6 def id @id end |
#options ⇒ Object
Returns the value of attribute options.
6 7 8 |
# File 'lib/topic_subtype.rb', line 6 def @options end |
Class Method Details
.list ⇒ Object
17 18 19 20 |
# File 'lib/topic_subtype.rb', line 17 def self.list return [] if @archetypes.blank? @archetypes.values end |
.moderator_warning ⇒ Object
30 31 32 |
# File 'lib/topic_subtype.rb', line 30 def self.moderator_warning "moderator_warning" end |
.notify_moderators ⇒ Object
34 35 36 |
# File 'lib/topic_subtype.rb', line 34 def self.notify_moderators "notify_moderators" end |
.notify_user ⇒ Object
38 39 40 |
# File 'lib/topic_subtype.rb', line 38 def self.notify_user "notify_user" end |
.pending_users_reminder ⇒ Object
42 43 44 |
# File 'lib/topic_subtype.rb', line 42 def self.pending_users_reminder "pending_users" end |
.register(name, options = {}) ⇒ Object
46 47 48 49 |
# File 'lib/topic_subtype.rb', line 46 def self.register(name, = {}) @subtypes ||= {} @subtypes[name] = TopicSubtype.new(name, ) end |
.system_message ⇒ Object
26 27 28 |
# File 'lib/topic_subtype.rb', line 26 def self. "system_message" end |
.user_to_user ⇒ Object
22 23 24 |
# File 'lib/topic_subtype.rb', line 22 def self.user_to_user "user_to_user" end |
Instance Method Details
#attributes ⇒ Object
13 14 15 |
# File 'lib/topic_subtype.rb', line 13 def attributes { "id" => @id, "options" => @options } end |