Method: Paperdragon::Attachment::InstanceMethods#task
- Defined in:
- lib/paperdragon/attachment.rb
#task(upload = nil, &block) ⇒ Object
DSL method providing the task instance. When called with block, it yields the task and returns the generated metadata.
32 33 34 35 36 37 |
# File 'lib/paperdragon/attachment.rb', line 32 def task(upload=nil, &block) task = Task.new(self, upload, &block) return task unless block_given? task. end |