Class: Delorean::FnArgs
- Defined in:
- lib/delorean/nodes.rb
Instance Method Summary collapse
Instance Method Details
#arg_count ⇒ Object
611 612 613 614 |
# File 'lib/delorean/nodes.rb', line 611 def arg_count defined?(args_rest.args) && !args_rest.args.text_value.empty? ? 1 + args_rest.args.arg_count : 1 end |
#check(context) ⇒ Object
596 597 598 599 600 601 602 |
# File 'lib/delorean/nodes.rb', line 596 def check(context, *) [ arg0.check(context), (args_rest.args.check(context) if defined?(args_rest.args) && !args_rest.args.text_value.empty?) ].compact.sum end |
#rewrite(context) ⇒ Object
604 605 606 607 608 609 |
# File 'lib/delorean/nodes.rb', line 604 def rewrite(context) rest = ', ' + args_rest.args.rewrite(context) if defined?(args_rest.args) && !args_rest.args.text_value.empty? [arg0.rewrite(context), rest].compact.sum end |