Module: Ruote::JsonReader
- Defined in:
- lib/ruote/reader/json.rb
Overview
Turns an XML string into a process definition tree.
Class Method Summary collapse
-
.read(s, opt = nil) ⇒ Object
Simply parses the JSON string.
-
.understands?(s) ⇒ Boolean
Returns true if s seems to be a JSON string.
Class Method Details
.read(s, opt = nil) ⇒ Object
Simply parses the JSON string
43 44 45 46 |
# File 'lib/ruote/reader/json.rb', line 43 def self.read(s, opt=nil) Rufus::Json.decode(s) end |
.understands?(s) ⇒ Boolean
Returns true if s seems to be a JSON string
35 36 37 38 39 |
# File 'lib/ruote/reader/json.rb', line 35 def self.understands?(s) s = s.strip true end |