class DParse::Parsers::Lazy
Public Class Methods
new(&block)
click to toggle source
# File lib/d-parse/parsers/modifiers/lazy.rb, line 4 def initialize(&block) raise ArgumentError, 'Expected block' unless block_given? @block = block end
Public Instance Methods
inspect()
click to toggle source
# File lib/d-parse/parsers/modifiers/lazy.rb, line 13 def inspect 'lazy(?)' end
read(input, pos)
click to toggle source
# File lib/d-parse/parsers/modifiers/lazy.rb, line 9 def read(input, pos) @block.call.read(input, pos) end