Sha256: 26ae77e768c25a333fd15a92e285da85fd49b408db9616d9190c21104b5ce808
Contents?: true
Size: 486 Bytes
Versions: 16
Compression:
Stored size: 486 Bytes
Contents
module TaskManager class DoneTaskFile < TaskFile DEFAULT_NO_RESULTS = 15 def all super.reverse!.first(DEFAULT_NO_RESULTS) end protected def root_node @root_node ||= begin xml.css(DONE_NODE).first || begin node = xml.create_element(DONE_NODE) super.add_child(node) node end end end def create_node(task) node = super node['finished_at'] = time_now node end end end
Version data entries
16 entries across 16 versions & 1 rubygems