Class: ABNF::Literal

Inherits:
Concat show all
Defined in:
lib/abnf.rb

Instance Method Summary collapse

Methods inherited from Concat

#match, #set_block

Constructor Details

#initialize(string, &blk) ⇒ Literal

Returns a new instance of Literal.



144
145
146
147
# File 'lib/abnf.rb', line 144

def initialize(string, &blk)
  @choices = string.each_char.map { |c| Char.new(c) }
  @blk = blk
end