Module: PrexView

Defined in:
lib/PrexView.rb,
lib/PrexView/version.rb

Constant Summary collapse

VERSION =
"1.0.0"

Class Method Summary collapse

Class Method Details

.send_json(json, options) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/PrexView.rb', line 19

def self.send_json json, options
  # Send doc to PrexView
  #
  # Example:
  #   >> PrexView.send_json(json, {type: "xml/json", token: "your_token"})
  #   => "200"
  #
  # Arguments:
  #   json: (String or json)
  #   type: (String)
  #   token: (String)
  code, content = PrexViewService::Transform.new(json, options).send_json
end

.send_xml(xml, options) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/PrexView.rb', line 5

def self.send_xml xml, options
  # Send doc to PrexView
  #
  # Example:
  #   >> PrexView.send_xml(xml, {type: "xml/json", token: "your_token"})
  #   => "200"
  #
  # Arguments:
  #   xml: (String or json)
  #   type: (String)
  #   token: (String)
  code, content = PrexViewService::Transform.new(xml, options).send_xml
end