Class: Adrift::Pattern::Tags::Filename
- Inherits:
-
Object
- Object
- Adrift::Pattern::Tags::Filename
- Defined in:
- lib/adrift/pattern.rb
Overview
Pattern’s tag that allows to generally express the Attachment’s file name.
Instance Method Summary collapse
-
#label ⇒ Object
Portion of Pattern#string that will be replaced.
-
#specialize(options = {}) ⇒ Object
Attachment’s filename.
Instance Method Details
#label ⇒ Object
Portion of Pattern#string that will be replaced.
141 142 143 |
# File 'lib/adrift/pattern.rb', line 141 def label ':filename' end |
#specialize(options = {}) ⇒ Object
Attachment’s filename. Expects options
to include the Attachment (:attachment
key).
147 148 149 |
# File 'lib/adrift/pattern.rb', line 147 def specialize(={}) [:attachment].filename.to_s end |