Module: DataBindings::Adapters::TNetstring::Convert

Includes:
ConverterHelper, GemRequirement
Defined in:
lib/data_bindings/adapters/tnetstring.rb

Instance Method Summary collapse

Methods included from GemRequirement

gentle_require_gem, included

Methods included from ConverterHelper

included

Instance Method Details

#force_convert_to_tnetstringString

Creates a String repsentation of a Ruby Hash or Array.

Parameters:

  • generator (Generator)

    The generator that invokes this constructor

  • name (Symbol)

    The name of the binding used on this object

  • obj (Array, Hash)

    The object to be represented in JSON

Returns:

  • (String)

    The Tnetstring representation of this object



24
25
26
# File 'lib/data_bindings/adapters/tnetstring.rb', line 24

def force_convert_to_tnetstring
  ::TNetstring.dump(self.to_hash)
end