Class: Vayacondios::StandardContentsHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/vayacondios/legacy_switch.rb,
lib/vayacondios/client/legacy_switch.rb,
lib/vayacondios/server/legacy_switch.rb

Overview

Are we operating on JSON Hashes (Vayacondios) or on JSON arrays (Vayacondios Legacy)? These classes determine which to use.

Instance Method Summary collapse

Instance Method Details

#extract_contents(document) ⇒ Object



9
# File 'lib/vayacondios/legacy_switch.rb', line 9

def extract_contents(document) document['contents'] end

#extract_response(document) ⇒ Object



10
# File 'lib/vayacondios/legacy_switch.rb', line 10

def extract_response(document) document['contents'] end

#proper_request(document) ⇒ Object



11
# File 'lib/vayacondios/legacy_switch.rb', line 11

def proper_request(document) true end

#wrap_contents(contents) ⇒ Object



8
# File 'lib/vayacondios/legacy_switch.rb', line 8

def wrap_contents(contents) {contents: contents} end