lib/alba/serializer.rb in alba-0.9.0 vs lib/alba/serializer.rb in alba-0.10.0

- old
+ new

@@ -23,15 +23,10 @@ private def key opts = self.class._opts || {} - case opts[:key] - when true - @resource.key - else - opts[:key] - end + opts[:key] == true ? @resource.key : opts[:key] end def metadata metadata = self.class._metadata || {} metadata.transform_values { |block| block.call(@resource.object) }