Class: TextExtractor::FileHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/text_extractor/file_handler.rb

Instance Method Summary collapse

Instance Method Details

#accept?(content_type) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
8
9
10
11
12
13
# File 'lib/text_extractor/file_handler.rb', line 5

def accept?(content_type)
  if @content_type
    content_type == @content_type
  elsif @content_types
    @content_types.include? content_type
  else
    false
  end
end