Class: Effective::Templates::Template
- Inherits:
-
Object
- Object
- Effective::Templates::Template
- Defined in:
- app/models/effective/templates/template.rb
Direct Known Subclasses
Instance Method Summary collapse
- #class_name ⇒ Object
- #description ⇒ Object
- #image ⇒ Object
- #title ⇒ Object
- #to_partial_path ⇒ Object
Instance Method Details
#class_name ⇒ Object
20 21 22 |
# File 'app/models/effective/templates/template.rb', line 20 def class_name @class_name ||= self.class.name.demodulize.underscore.to_sym end |
#description ⇒ Object
8 9 10 |
# File 'app/models/effective/templates/template.rb', line 8 def description "Insert #{title}" end |
#image ⇒ Object
12 13 14 |
# File 'app/models/effective/templates/template.rb', line 12 def image "#{class_name}.png" end |
#title ⇒ Object
4 5 6 |
# File 'app/models/effective/templates/template.rb', line 4 def title class_name.to_s.humanize end |
#to_partial_path ⇒ Object
16 17 18 |
# File 'app/models/effective/templates/template.rb', line 16 def to_partial_path "effective/templates/#{class_name}" end |