lib/contentful/resource/system_properties.rb in contentful-0.6.0 vs lib/contentful/resource/system_properties.rb in contentful-0.7.0
- old
+ new
@@ -13,12 +13,12 @@
updatedAt: :date,
locale: :string
}
attr_reader :sys
- def initialize(object, *)
+ def initialize(object = nil, *)
super
- @sys = extract_from_object object['sys'], :sys
+ @sys = object ? extract_from_object(object['sys'], :sys) : {}
end
def inspect(info = nil)
if sys.empty?
super(info)