Class List Method List File List

# Module: WpTimthumb::Existable

Included in:
  WpTimthumb
Defined in:
  lib/common/models/wp_timthumb/existable.rb

## Instance Method Summary (collapse)

- - (Boolean) exists_from_response?(response, options = {})

## Instance Method Details

### - (`Boolean`) exists_from_response?(response, options = {})

Parameters:

- response (`Typhoeus::Response`)
- options (`Hash`) (defaults to: `{}`)

Returns:

- (`Boolean`)

    10
    11
    12
    # File 'lib/common/models/wp_timthumb/existable.rb', line 10

    def exists_from_response?(response, options = {})
      response.code == 400 && response.body =~ /no image specified/i ? true : false
    end