Class: DomainSanity::Name::Normalized

Inherits:
Struct
  • Object
show all
Defined in:
lib/domain_sanity/name.rb

Overview

The one-pass normalized view of a subject. kind is always set; the remaining fields are populated only for the :hostname kind (the other kinds fail fast with a single reason and need no structural analysis). input - the original string (or nil) name - input with a single trailing "root" dot removed ascii - punycode form of name, or nil if unconvertible unicode - Unicode form of name (falls back to name) labels - ascii split on ".", preserving empty edge labels psl - PublicSuffix::Domain, or nil if not registrable

Instance Attribute Summary collapse

Instance Attribute Details

#asciiObject

Returns the value of attribute ascii

Returns:

  • (Object)

    the current value of ascii



65
66
67
# File 'lib/domain_sanity/name.rb', line 65

def ascii
  @ascii
end

#inputObject

Returns the value of attribute input

Returns:

  • (Object)

    the current value of input



65
66
67
# File 'lib/domain_sanity/name.rb', line 65

def input
  @input
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



65
66
67
# File 'lib/domain_sanity/name.rb', line 65

def kind
  @kind
end

#labelsObject

Returns the value of attribute labels

Returns:

  • (Object)

    the current value of labels



65
66
67
# File 'lib/domain_sanity/name.rb', line 65

def labels
  @labels
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



65
66
67
# File 'lib/domain_sanity/name.rb', line 65

def name
  @name
end

#pslObject

Returns the value of attribute psl

Returns:

  • (Object)

    the current value of psl



65
66
67
# File 'lib/domain_sanity/name.rb', line 65

def psl
  @psl
end

#unicodeObject

Returns the value of attribute unicode

Returns:

  • (Object)

    the current value of unicode



65
66
67
# File 'lib/domain_sanity/name.rb', line 65

def unicode
  @unicode
end