# module WpTimthumb::Versionable

### Public Instance Methods

to_s() click to toggle source

@return [ String ]

    # File lib/common/models/wp_timthumb/versionable.rb, line 18
    def to_s
      "#{url}#{ ' v' + version if version}"
    end

version() click to toggle source

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

@return [ String ] The version

    # File lib/common/models/wp_timthumb/versionable.rb, line 9
    def version
      unless @version
        response = Browser.get(url)
        @version = response.body[%r{TimThumb version\s*: ([^<]+)} , 1]
      end
      @version
    end