struct

Task

Inherits JSON::Serializable < Struct < Value < Object

Constants

MAX_TITLE = 120

Constructors

new(id : Int64, title : String, completed : Bool = false, created_at : Time = Time.utc)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Class methods

validate_title(raw : String | Nil) : String | NamedTuple(error: String)

Returns the cleaned title, or an error message.

Source

Instance methods

completed?
Source
created_at
Source
title
Source
with(completed : Bool | Nil = nil, title : String | Nil = nil) : Task
Source