Method: Restify::Resource#==

Defined in:
lib/restify/resource.rb

#==(other) ⇒ Object

Compare with other Restify::Resources or hashes.



33
34
35
36
37
38
39
40
41
42
# File 'lib/restify/resource.rb', line 33

def ==(other)
  case other
    when Resource
      super && relations == other.relations
    when Hash
      super Hash[other.map{|k,v| [convert_key(k), v] }]
    else
      super
  end
end