Sha256: 79bbde92861ac90e51d0ae4c5849773572f8c8f54b76c2b971769197f49be9ff
Contents?: true
Size: 510 Bytes
Versions: 1
Compression:
Stored size: 510 Bytes
Contents
# frozen_string_literal: true module TooDoo # Task is the base model of the app # it's a presenter of stored data class Task attr_reader :body, :status CREATED_STATUS = :created DONE_STATUS = :done def initialize(body, status = CREATED_STATUS) @body = body @status = status end def done? @status == DONE_STATUS end def done! @status = DONE_STATUS end def ==(other) body == other.body && status == other.status end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
toodoo-0.1.1 | lib/toodoo/task.rb |