Class: ABNF::Char
Overview
Core Rules
I tried to preserve the RFC names where possible.
Instance Method Summary collapse
-
#initialize(c) ⇒ Char
constructor
A new instance of Char.
- #predicate(c) ⇒ Object
Methods inherited from Satisfies
Constructor Details
#initialize(c) ⇒ Char
Returns a new instance of Char.
225 226 227 |
# File 'lib/abnf.rb', line 225 def initialize(c) @char = c.ord end |
Instance Method Details
#predicate(c) ⇒ Object
229 230 231 |
# File 'lib/abnf.rb', line 229 def predicate(c) c == @char end |