Class: Adrift::Pattern::Tags::Class
- Inherits:
-
Object
- Object
- Adrift::Pattern::Tags::Class
- Defined in:
- lib/adrift/pattern.rb
Overview
Pattern’s tag that allows to generally express the model’s to which the Attachment belongs class name including its namespace.
Instance Method Summary collapse
-
#label ⇒ Object
Portion of Pattern#string that will be replaced.
-
#specialize(options = {}) ⇒ Object
Pluralized model’s class name namespaced.
Instance Method Details
#label ⇒ Object
Portion of Pattern#string that will be replaced.
77 78 79 |
# File 'lib/adrift/pattern.rb', line 77 def label ':class' end |
#specialize(options = {}) ⇒ Object
Pluralized model’s class name namespaced. Expects options
to include the Attachment (:attachment
key).
83 84 85 |
# File 'lib/adrift/pattern.rb', line 83 def specialize(={}) [:attachment].model.class.name.underscore.pluralize end |