Class: Adrift::Pattern::Tags::Url
- Inherits:
-
Object
- Object
- Adrift::Pattern::Tags::Url
- Defined in:
- lib/adrift/pattern.rb
Overview
Pattern’s tag that allows to generally express the Attachment’s url.
Instance Method Summary collapse
-
#label ⇒ Object
Portion of Pattern#string that will be replaced.
-
#specialize(options = {}) ⇒ Object
Attachment’s url.
Instance Method Details
#label ⇒ Object
Portion of Pattern#string that will be replaced.
61 62 63 |
# File 'lib/adrift/pattern.rb', line 61 def label ':url' end |
#specialize(options = {}) ⇒ Object
Attachment’s url. Expects options
to include the Attachment (:attachment
key), and the selected style (:style
key). .
68 69 70 |
# File 'lib/adrift/pattern.rb', line 68 def specialize(={}) [:attachment].url([:style]).to_s end |