Sha256: 698314602910f28d5bb877670bd41ddd0857bdae1e377d41592fc5397d66c2d2

Contents?: true

Size: 230 Bytes

Versions: 7

Compression:

Stored size: 230 Bytes

Contents

module Flakey
  module Base
    # Allow inclusion in classes that don't respond to :request, or 
    # where request is nil (such as mailers).
    def default_url
      respond_to?(:request) && request.try(:url)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
flakey-0.8.2 lib/flakey/base.rb
flakey-0.8.1 lib/flakey/base.rb
flakey-0.8.0 lib/flakey/base.rb
flakey-0.7.0 lib/flakey/base.rb
flakey-0.6.1 lib/flakey/base.rb
flakey-0.6.0 lib/flakey/base.rb
flakey-0.5.0 lib/flakey/base.rb