Module: ActiveModelArchive::Attributes
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/active_model_archive/attributes.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#archive_attributes ⇒ Object
11 12 13 |
# File 'lib/active_model_archive/attributes.rb', line 11 def archive_attributes self.class.archive_attributes end |
#as_archive ⇒ Object
15 16 17 |
# File 'lib/active_model_archive/attributes.rb', line 15 def as_archive attributes end |
#to_archive ⇒ Object
19 20 21 22 23 |
# File 'lib/active_model_archive/attributes.rb', line 19 def to_archive archiver.encode(self).tap do |encoded| encoded.force_encoding('UTF-8') end end |
#to_archive_header ⇒ Object
25 26 27 |
# File 'lib/active_model_archive/attributes.rb', line 25 def to_archive_header archiver.header(self) end |