Module: Pump::Array

Included in:
Array
Defined in:
lib/pump/array.rb

Instance Method Summary collapse

Instance Method Details

#pump_to_json(options = {}) ⇒ Object



9
10
11
12
13
# File 'lib/pump/array.rb', line 9

def pump_to_json(options={})
  encoder = get_pump_encoder(options[:set], :json)
  return to_json(options) unless encoder
  encoder.encode(self, options)
end

#pump_to_xml(options = {}) ⇒ Object



3
4
5
6
7
# File 'lib/pump/array.rb', line 3

def pump_to_xml(options={})
  encoder = get_pump_encoder(options[:set], :xml)
  return to_xml(options) unless encoder
  encoder.encode(self, options)
end