Class: Edrive::Handler
- Inherits:
-
Object
- Object
- Edrive::Handler
- Defined in:
- lib/edrive/handler.rb
Overview
event handlers sample
Class Method Summary collapse
-
.hash2json ⇒ Proc
hash to json.
-
.json2hash ⇒ JSON
json to hash.
Class Method Details
.hash2json ⇒ Proc
hash to json
11 12 13 |
# File 'lib/edrive/handler.rb', line 11 def hash2json ->(hash) { Oj.dump(hash, :compat) } end |
.json2hash ⇒ JSON
json to hash
17 18 19 |
# File 'lib/edrive/handler.rb', line 17 def json2hash ->(json) { Oj.load(json) } end |