Class: ABNF::RangeWithInfiniteUpperBound

Inherits:
Object
  • Object
show all
Defined in:
lib/abnf.rb

Instance Method Summary collapse

Constructor Details

#initialize(first) ⇒ RangeWithInfiniteUpperBound

Returns a new instance of RangeWithInfiniteUpperBound.



12
13
14
# File 'lib/abnf.rb', line 12

def initialize(first)
  @first = first
end

Instance Method Details

#firstObject



16
17
18
# File 'lib/abnf.rb', line 16

def first
  @first
end

#until_endObject

&blk



20
21
22
23
24
25
26
27
# File 'lib/abnf.rb', line 20

def until_end # &blk
  i = 0

  while true
    yield i
    i += 1
  end
end