class SPF::Query::Parser

SPF parser.

@see tools.ietf.org/html/rfc7208#section-7.1

Public Class Methods

parse(spf) click to toggle source

Parses the SPF record.

@param [String] spf

The raw SPF record.

@return [Record]

The parsed SPF record.

@raise [Parslet::ParseError]

# File lib/spf/query/parser.rb, line 282
def self.parse(spf)
  Transform.new.apply(new.parse(spf))
end

Public Instance Methods

h16l(times) click to toggle source
# File lib/spf/query/parser.rb, line 216
def h16l(times)
  (colon >> h16).repeat(0,times)
end
h16r(times) click to toggle source
# File lib/spf/query/parser.rb, line 212
def h16r(times)
  (h16 >> colon).repeat(times, times)
end