Method: Code::Object::Context#code_lookup!
- Defined in:
- lib/code/object/context.rb
#code_lookup!(identifier) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/code/object/context.rb', line 13 def code_lookup!(identifier) code_identifier = identifier.to_code if code_has_key?(code_identifier).truthy? self elsif parent? parent.code_lookup!(code_identifier) else raise Error, "#{code_identifier} is not defined" end end |