Class: Delorean::GetAttr
- Defined in:
- lib/delorean/nodes.rb
Instance Method Summary collapse
Instance Method Details
#check(_context) ⇒ Object
377 378 379 |
# File 'lib/delorean/nodes.rb', line 377 def check(_context, *) [] end |
#rewrite(_context, vcode) ⇒ Object
381 382 383 384 385 |
# File 'lib/delorean/nodes.rb', line 381 def rewrite(_context, vcode) attr = i.text_value attr = "'#{attr}'" unless attr =~ /\A[0-9]+\z/ "_get_attr(#{vcode}, #{attr}, _e)" end |