Class: Adrift::Pattern::Tags::Attachment
- Inherits:
-
Object
- Object
- Adrift::Pattern::Tags::Attachment
- Defined in:
- lib/adrift/pattern.rb
Overview
Pattern’s tag that allows to generally express the Attachment’s name.
Instance Method Summary collapse
-
#label ⇒ Object
Portion of Pattern#string that will be replaced.
-
#specialize(options = {}) ⇒ Object
Pluralized Attachment’s name.
Instance Method Details
#label ⇒ Object
Portion of Pattern#string that will be replaced.
31 32 33 |
# File 'lib/adrift/pattern.rb', line 31 def label ':attachment' end |
#specialize(options = {}) ⇒ Object
Pluralized Attachment’s name. Expects options
to include the Attachment (:attachment
key).
37 38 39 |
# File 'lib/adrift/pattern.rb', line 37 def specialize(={}) [:attachment].name.to_s.underscore.pluralize end |