Method: Montrose::Recurrence.load
- Defined in:
- lib/montrose/recurrence.rb
.load(json) ⇒ Object Also known as: from_json
242 243 244 245 246 247 248 |
# File 'lib/montrose/recurrence.rb', line 242 def load(json) return nil if json.blank? new JSON.parse(json) rescue JSON::ParserError => e fail SerializationError, "Could not parse JSON: #{e}" end |