lib/active_encode/input.rb in active_encode-0.2 vs lib/active_encode/input.rb in active_encode-0.4
- old
+ new
@@ -3,7 +3,13 @@
include Status
include TechnicalMetadata
attr_accessor :id
attr_accessor :url
+
+ def valid?
+ id.present? && url.present? &&
+ created_at.is_a?(Time) && updated_at.is_a?(Time) &&
+ updated_at >= created_at
+ end
end
end