# Module: WpTimthumb::Versionable — Documentation by YARD 0.8.6.1

Class List Method List File List

# Module: WpTimthumb::Versionable

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

## Instance Method Summary (collapse)

- - (String) to_s
- - (String) version

  Get the version from the body of an invalid request See code.google.com/p/timthumb/source/browse/trunk/timthumb.php#426.

## Instance Method Details

### - (`String`) to_s

Returns:

- (`String`)

    19
    20
    21

    # File 'lib/common/models/wp_timthumb/versionable.rb', line 19

    def to_s
      "#{url}#{ ' v' + version if version}"
    end

### - (`String`) version

Get the version from the body of an invalid request See code.google.com/p/timthumb/source/browse/trunk/timthumb.php#426

Returns:

- (`String`) —

  The version

    10
    11
    12
    13
    14
    15
    16

    # File 'lib/common/models/wp_timthumb/versionable.rb', line 10

    def version
      unless @version
        response = Browser.get(url)
        @version = response.body[%r{TimThumb version\s*: ([^<]+)} , 1]
      end
      @version
    end