abstract class TodoInputPort

Overview

Abstract class representing a Todo Input Port.

This abstract class defines a set of abstract methods for managing todos.

Example Usage:

# Create a concrete implementation of TodoInputPort
class TodoInputPortImpl < TodoInputPort
  def get_all_todos : Array(Todo)
    # implementation goes here
  end

  def get_todo_by_id(id : Int32) : Todo?
    # implementation goes here
  end

  def create_todo(title : String) : Todo
    # implementation goes here
  end

  def mark_todo_as_completed(todo : Todo) : Todo
    # implementation goes here
  end
end

Inputs: None

Flow:

Outputs:

Direct Known Subclasses

Defined in:

domain/ports/todo_input.cr

Instance Method Summary

Instance Method Detail

abstract def all_todos : Array(Todo) #

[View source]
abstract def create_todo(title : String) : Todo #

[View source]
abstract def get_todo_by_id(id : String) : Todo | Nil #

[View source]
abstract def mark_todo_as_completed(todo : Todo) : Todo #

[View source]