lib/bullit/task.rb in bullit-0.1.2 vs lib/bullit/task.rb in bullit-0.1.3
- old
+ new
@@ -1,6 +1,6 @@
-module BulletJournal
+module Bullit
class Task
attr_accessor :text, :complete
def initialize(text:, complete: false, created_at: Time.now)
@text = text
@@ -18,7 +18,13 @@
def mark_as_complete
@complete = true
to_h
end
+ end
+end
+
+class Hash
+ def to_task
+ Bullit::Task.new(self)
end
end
\ No newline at end of file