Machete.PortMatcher (Machete v0.3.11)

View Source

Defines a matcher that matches port values

Summary

Types

Describes the arguments that can be passed to this matcher

t()

Describes an instance of this matcher

Functions

Matches against port values

Types

opts()

@type opts() :: []

Describes the arguments that can be passed to this matcher

t()

@opaque t()

Describes an instance of this matcher

Functions

port(opts \\ [])

@spec port(opts()) :: t()

Matches against port values

Takes no arguments

Examples:

iex> assert hd(Port.list()) ~> port()
true

iex> refute "a" ~> port()
false