Module: Pump::Object
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/pump/object.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#pump_to_json(options = {}) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/pump/object.rb', line 18 def pump_to_json(={}) encoder = self.class.pumps.get([:set], :json) if encoder encoder.encode(self, ) else to_json() end end |
#pump_to_xml(options = {}) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/pump/object.rb', line 9 def pump_to_xml(={}) encoder = self.class.pumps.get([:set], :xml) if encoder encoder.encode(self, ) else to_xml() end end |