Class: Ame::Splat
Instance Attribute Summary
Attributes inherited from Argument
Instance Method Summary collapse
Methods inherited from Argument
#initialize, #optional?, #required?, #to_s
Constructor Details
This class inherits a constructor from Ame::Argument
Instance Method Details
#arity ⇒ Object
4 5 6 |
# File 'lib/ame/splat.rb', line 4 def arity -1 end |
#process(options, processed, arguments) ⇒ Object
8 9 10 11 |
# File 'lib/ame/splat.rb', line 8 def process(, processed, arguments) super , processed, nil if required? and arguments.empty? arguments.map{ |argument| super(, processed, argument) }.tap{ arguments.clear } end |