lib/kamerling/task.rb in kamerling-0.0.2 vs lib/kamerling/task.rb in kamerling-0.0.3
- old
+ new
@@ -1,9 +1,9 @@
-module Kamerling class Task < UUIDEntity
- attribute :data, String
- attribute :done, Boolean, default: false
- attribute :project, Project
+require_relative 'project'
+require_relative 'uuid_entity'
- def to_h
- super.reject { |key, _| key == :project }.merge project_uuid: project.uuid
+module Kamerling
+ class Task < UUIDEntity
+ attrs data: String, done: Boolean, project: Project
+ defaults done: false
end
-end end
+end