Method: Delorean::SafeNavigationGetAttr#rewrite
- Defined in:
- lib/delorean/nodes.rb
#rewrite(_context, vcode) ⇒ Object
399 400 401 402 403 |
# File 'lib/delorean/nodes.rb', line 399 def rewrite(_context, vcode) attr = i.text_value attr = "'#{attr}'" unless /\A[0-9]+\z/.match?(attr) "_safe_navigation_get_attr(#{vcode}, #{attr}, _e)" end |