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.



627
628
629
# File 'lib/forme.rb', line 627

def _form
  @_form
end

Instance Method Details

#to_sObject

Return a string containing the serialized content of the receiver.



630
631
632
# File 'lib/forme.rb', line 630

def to_s
  _form.serialize(self)
end