Class: Adrift::Pattern::Tags::Filename

Inherits:
Object
  • Object
show all
Defined in:
lib/adrift/pattern.rb

Overview

Pattern’s tag that allows to generally express the Attachment’s file name.

Instance Method Summary collapse

Instance Method Details

#labelObject

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(options={})
  options[:attachment].filename.to_s
end