Sha256: cc6afcc328d87cc4ad990502c5549a9727249b38ece090d258d22f8a62f08923

Contents?: true

Size: 281 Bytes

Versions: 5

Compression:

Stored size: 281 Bytes

Contents

# encoding: utf-8

    class Hash
      def extractable_options?
        instance_of?(Hash)
      end
    end

    class Array
      def extract_options!
        if last.is_a?(Hash) && last.extractable_options?
          pop
        else
          {}
        end
      end
    end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
github_api-0.2.0 lib/github_api/api/extract_options.rb
github_api-0.1.2 lib/github_api/api/extract_options.rb
github_api-0.1.1 lib/github_api/api/extract_options.rb
github_api-0.1.0 lib/github_api/api/extract_options.rb
github_api-0.1.0.pre lib/github_api/api/extract_options.rb