Class: Teamsupport::Arguments

Inherits:
Array
  • Object
show all
Defined in:
lib/teamsupport/arguments.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Teamsupport::Arguments

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Initializes a new Arguments object

Parameters:

  • args (Hash)


21
22
23
24
# File 'lib/teamsupport/arguments.rb', line 21

def initialize(args)
  @options = args.last.is_a?(::Hash) ? args.pop : {}
  super(args.flatten)
end

Instance Attribute Details

#optionsHash (readonly)

Provide an options method for reading argument options

Examples:

teamsupport_arguments = Teamsupport::Arguments.new(args)
teamsupport_arguments.options

Returns:

  • (Hash)


12
13
14
# File 'lib/teamsupport/arguments.rb', line 12

def options
  @options
end