Sha256: 3368afea97127b7389908ae432357abc8857bc01faf58cb5ccb8ea323e54b679
Contents?: true
Size: 652 Bytes
Versions: 91
Compression:
Stored size: 652 Bytes
Contents
module Typhoeus class Filter attr_reader :method_name def initialize(method_name, options = {}) @method_name = method_name @options = options end def apply_filter?(method_name) if @options[:only] if @options[:only].instance_of? Symbol @options[:only] == method_name else @options[:only].include?(method_name) end elsif @options[:except] if @options[:except].instance_of? Symbol @options[:except] != method_name else !@options[:except].include?(method_name) end else true end end end end
Version data entries
91 entries across 91 versions & 15 rubygems