Module: WorkOS::HashProvider

Overview

Module to include an explicit method for converting a model into a Hash containing its attributes. Default implementation will simply call to_json. Individual classes may override.

Instance Method Summary collapse

Instance Method Details

#to_hObject



14
15
16
# File 'lib/workos/hash_provider.rb', line 14

def to_h
  to_json
end

#to_jsonObject



10
11
12
# File 'lib/workos/hash_provider.rb', line 10

def to_json(*)
  raise 'Must be implemented by including class.'
end