Class: Ame::Splat

Inherits:
Splus show all
Defined in:
lib/ame-1.0/splat.rb

Overview

Represents a splat argument to a Method, which works just like a Splus, except that it won’t fail if there are no more arguments left.

Instance Attribute Summary

Attributes inherited from Argument

#description, #name

Instance Method Summary collapse

Methods inherited from Argument

#initialize, #to_s

Constructor Details

This class inherits a constructor from Ame::Argument

Instance Method Details

#process(options, processed, arguments) ⇒ Array<Object>

Processes each argument in ARGUMENTS via Argument#process.

Parameters:

  • options (Hash<String, Object>)
  • processed (Array<String>)
  • arguments (Array<String>)

Returns:

  • (Array<Object>)

Raises:



13
14
15
# File 'lib/ame-1.0/splat.rb', line 13

def process(options, processed, arguments)
  arguments.empty? ? [] : super
end