Module: ToonFu::Encodable
- Defined in:
- lib/toon_fu/encodable.rb
Overview
Adds to_toon to the core and standard-library classes TOON encodes.
BigDecimal is left out: it is a bundled gem the encoder accepts but
does not load. Include this module into a class that defines as_toon
to give that class to_toon as well.
Instance Method Summary collapse
-
#to_toon(**options) ⇒ String
The receiver encoded as TOON, as encode would.
Instance Method Details
#to_toon(**options) ⇒ String
Returns the receiver encoded as TOON, as ToonFu.encode would.
12 13 14 |
# File 'lib/toon_fu/encodable.rb', line 12 def to_toon(**) ToonFu.encode(self, **) end |