Class: Delorean::UnpackArgs

Inherits:
SNode
  • Object
show all
Defined in:
lib/delorean/nodes.rb

Instance Method Summary collapse

Instance Method Details

#check(context) ⇒ Object



640
641
642
643
644
# File 'lib/delorean/nodes.rb', line 640

def check(context, *)
  [arg0.text_value] +
    (defined?(args_rest.args) && !args_rest.args.text_value.empty? ?
     args_rest.args.check(context) : [])
end

#rewrite(context) ⇒ Object



646
647
648
649
650
# File 'lib/delorean/nodes.rb', line 646

def rewrite(context)
  arg0.rewrite(context) +
    (defined?(args_rest.args) && !args_rest.args.text_value.empty? ?
     ', ' + args_rest.args.rewrite(context) : '')
end