lib/rcap/cap_1_0/alert.rb in rcap-1.1.1 vs lib/rcap/cap_1_0/alert.rb in rcap-1.2.0
- old
+ new
@@ -365,10 +365,10 @@
:infos => Array( alert_hash[ INFOS_KEY ]).map{ |info_hash| Info.from_h( info_hash )})
end
# Returns a JSON string representation of an Alert object
def to_json( pretty_print = false )
- if pretty_print
+ if pretty_print
JSON.pretty_generate( self.to_h )
else
self.to_h.to_json
end
end