Module: Forme::Serialized

Defined in:
lib/forme.rb

Overview

Module that can extend objects associating them with a specific Form instance. Calling to_s on the object will then use the form’s serializer to return a string.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#_formObject

The Form instance related to the receiver.



560
561
562
# File 'lib/forme.rb', line 560

def _form
  @_form
end

Instance Method Details

#to_sObject

Return a string containing the serialized content of the receiver.



563
564
565
# File 'lib/forme.rb', line 563

def to_s
  _form.serialize(self)
end