Class: XMLable::Exports::JSONExporter

Inherits:
Base
  • Object
show all
Defined in:
lib/xmlable/exports/json_exporter.rb

Overview

JSONExporter class exports object into JSON format

Instance Method Summary collapse

Methods inherited from Base

#initialize, #node_merged_opts, #node_nested_options, #node_options

Constructor Details

This class inherits a constructor from XMLable::Exports::Base

Instance Method Details

#exportHash

Export into JSON format

Returns:

  • (Hash)


12
13
14
15
# File 'lib/xmlable/exports/json_exporter.rb', line 12

def export
  opts = node_nested_options(@element.__node)
  export_object(@element, opts)
end