Sha256: aa2943006536d0b89de2a531cef8b9b0f2a76961109652bbf91343201335ec54

Contents?: true

Size: 244 Bytes

Versions: 5

Compression:

Stored size: 244 Bytes

Contents

module Nearmiss

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

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

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
nearmiss-ruby-1.0.4 lib/nearmiss-ruby/arguments.rb
nearmiss-ruby-1.0.3 lib/nearmiss-ruby/arguments.rb
nearmiss-ruby-1.0.2 lib/nearmiss-ruby/arguments.rb
nearmiss-ruby-1.0.1 lib/nearmiss-ruby/arguments.rb
nearmiss-ruby-1.0.0 lib/nearmiss-ruby/arguments.rb