Module: CouchPotato::Attachments
- Defined in:
- lib/couch_potato/persistence/attachments.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.included(base) ⇒ Object
:nodoc:.
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
:nodoc:
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/couch_potato/persistence/attachments.rb', line 3 def self.included(base) #:nodoc: base.class_eval do attr_writer :_attachments def @_attachments ||= {} end base.extend ClassMethods end end |
Instance Method Details
#to_hash ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/couch_potato/persistence/attachments.rb', line 15 def to_hash if && .any? super.merge('_attachments' => ) else super end end |