Class: Rsec::Lazy
Overview
sometimes a variable is not defined yet<br/> lazy is used to capture it later NOTE the value is captured the first time it is called
Instance Attribute Summary
Attributes inherited from Unary
Attributes included from Parser
Instance Method Summary collapse
Methods included from Parser
#&, #*, #<<, #>>, #^, #cached, #eof, #fail, #inspect, #join, #map, #maybe, #parse, #parse!, #star, #|
Instance Method Details
#_parse(ctx) ⇒ Object
157 158 159 160 161 162 163 164 165 |
# File 'lib/rsec/parsers/misc.rb', line 157 def _parse ctx @some ||= \ begin some()[] rescue NameError => ex some().binding.eval ex.name.to_s end @some._parse ctx end |