Class: Octokit::Arguments

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

Overview

Extracts options from method arguments

Direct Known Subclasses

RepoArguments

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Arguments

Returns a new instance of Arguments.



8
9
10
11
# File 'lib/octokit/arguments.rb', line 8

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

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/octokit/arguments.rb', line 6

def options
  @options
end