Sha256: f8ff4dab8b8bd868403b561488d7b301676f9bc8a5b8745b6c97a1bff4c6b12c
Contents?: true
Size: 463 Bytes
Versions: 393
Compression:
Stored size: 463 Bytes
Contents
defmodule Clock do defstruct hour: 0, minute: 0 @doc """ Returns a string representation of a clock: iex> Clock.new(8, 9) |> to_string "08:09" """ @spec new(integer, integer) :: Clock def new(hour, minute) do end @doc """ Adds two clock times: iex> Clock.add(10, 0) |> Clock.add(3) |> to_string "10:03" """ @spec add(Clock, integer) :: Clock def add(%Clock{hour: hour, minute: minute}, add_minute) do end end
Version data entries
393 entries across 393 versions & 1 rubygems