File: arguments.rb

package info (click to toggle)
ruby-octokit 10.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,092 kB
  • sloc: ruby: 13,339; sh: 99; makefile: 7; javascript: 3
file content (14 lines) | stat: -rw-r--r-- 266 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

module Octokit
  # Extracts options from method arguments
  # @private
  class Arguments < Array
    attr_reader :options

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