Method: OkComputer::CheckCollection#to_json
- Defined in:
- lib/ok_computer/check_collection.rb
#to_json(*args) ⇒ Object
Public: The JSON of each check in the collection
Returns a String containing a JSON array of hashes
35 36 37 38 39 40 41 42 43 |
# File 'lib/ok_computer/check_collection.rb', line 35 def to_json(*args) # smooshing their #to_json objects into one JSON hash combined = {} checks.each do |check| combined.merge!(JSON.parse(check.to_json)) end combined.to_json end |