Class: Delorean::Identifier
- Defined in:
- lib/delorean/nodes.rb
Instance Method Summary collapse
Instance Method Details
#check(context) ⇒ Object
329 330 331 332 |
# File 'lib/delorean/nodes.rb', line 329 def check(context, *) context.parse_call_last_node_attr(text_value) [text_value] end |
#rewrite(context) ⇒ Object
334 335 336 337 338 339 340 341 |
# File 'lib/delorean/nodes.rb', line 334 def rewrite(context) # Identifiers are just attr accesses. These are translated to # class method calls. POST is used in mangling the attr names. # _e is the environment. Comprehension vars (in comp_set) are # not passed the env arg. arg = context.comp_set.member?(text_value) ? '' : '(_e)' text_value + POST + arg end |