Fulfill Object#to_h

This commit is contained in:
Benjamin Fleischer 2017-05-15 10:24:39 -05:00
parent f885ee8d7d
commit ef00242421

View File

@ -139,7 +139,7 @@ module AMS
@object = object
end
def as_json
def to_h
{
id: id,
type: type
@ -148,6 +148,7 @@ module AMS
relationships: relations
}.reject { |_, v| v.empty? })
end
alias as_json to_h
def to_json
dump(as_json)