Class: Arrest::Handlers::IdentityJSONKeyConverter

Inherits:
Object
  • Object
show all
Defined in:
lib/arrest/handler.rb

Overview

a converter to transform between the name of the field in the json object and the name of the field in ruby code. Default behaviour is the identity, i.e. the very same string in JSON as in RUBY

Class Method Summary collapse

Class Method Details

.key_from_json(name) ⇒ Object



27
28
29
# File 'lib/arrest/handler.rb', line 27

def key_from_json name
  name.to_s
end

.key_to_json(name) ⇒ Object



31
32
33
# File 'lib/arrest/handler.rb', line 31

def key_to_json name
  name.to_s
end