Other automation client languages such as Visual Basic have the
concept of
named arguments. Suppose you had a Visual Basic
routine with the signature:
Song(artist, title, length): rem Visual Basic
|
Instead of calling it with all three arguments in the order specified,
you could use named arguments.
Song title := 'Get It On': rem Visual Basic
|
This is equivalent to the call
Song(nil, 'Get It On', nil)
.
In Ruby, you can use this feature by passing a hash with the named
arguments.
Song.new( 'title' => 'Get It On' )
|