enum CrSerializer::Assertions::IPVersion

Overview

Which IP version to use to validate the IP string

Defined in:

CrSerializer/assertions/ip.cr

Enum Members

IPV4 = 0

Matches IPv4 format

IPV6 = 1

Matches IPv6 format

Instance Method Summary

Instance methods inherited from struct Enum

to_json(json : JSON::Builder, groups : Array(String), expand : Array(String)) to_json, to_yaml(yaml : YAML::Nodes::Builder, groups : Array(String), expand : Array(String)) to_yaml

Instance methods inherited from class Object

to_json(io : IO, groups : Array(String), expand : Array(String))
to_json(groups : Array(String) = ["default"], expand : Array(String) = [] of String) : String
to_json
, to_pretty_json(indent : String = " ", groups : Array(String) = ["default"], expand : Array(String) = [] of String)
to_pretty_json(io : IO, groups : Array(String), expand : Array(String), indent : String = " ")
to_pretty_json
, to_yaml(groups : Array(String) = ["default"], expand : Array(String) = [] of String) : String to_yaml

Instance Method Detail

def ipv4? #

[View source]
def ipv6? #

[View source]