Class: Archetype
- Inherits:
-
Object
- Object
- Archetype
- Includes:
- ActiveModel::Serialization
- Defined in:
- lib/archetype.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
- .banner ⇒ Object
- .default ⇒ Object
- .list ⇒ Object
- .private_message ⇒ Object
- .register(name, options = {}) ⇒ Object
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(id, options) ⇒ Archetype
constructor
A new instance of Archetype.
Constructor Details
#initialize(id, options) ⇒ Archetype
Returns a new instance of Archetype.
8 9 10 11 |
# File 'lib/archetype.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/archetype.rb', line 6 def id @id end |
#options ⇒ Object
Returns the value of attribute options.
6 7 8 |
# File 'lib/archetype.rb', line 6 def @options end |
Class Method Details
.banner ⇒ Object
25 26 27 |
# File 'lib/archetype.rb', line 25 def self. "banner" end |
.default ⇒ Object
17 18 19 |
# File 'lib/archetype.rb', line 17 def self.default "regular" end |
.list ⇒ Object
29 30 31 32 |
# File 'lib/archetype.rb', line 29 def self.list return [] unless @archetypes.present? @archetypes.values end |
.private_message ⇒ Object
21 22 23 |
# File 'lib/archetype.rb', line 21 def self. "private_message" end |
Instance Method Details
#attributes ⇒ Object
13 14 15 |
# File 'lib/archetype.rb', line 13 def attributes { id: @id, options: @options } end |