module NestedText::ToNTMixin

A mixin for Custom Classes to get the to_nt shortcut.

Public Instance Methods

to_nt(**kwargs) click to toggle source

Encode this object to a NestedText string.

This method takes the same named arguments as {NestedText.dump}.

# File lib/nestedtext/encode_helpers.rb, line 11
def to_nt(**kwargs)
  NestedText.dump(self, strict: false, **kwargs)
end