Sha256: 54f1456d0b0bec2fafb5d3d19ed2e2af4398872938a8d9f3fde19467a7593d99

Contents?: true

Size: 445 Bytes

Versions: 1

Compression:

Stored size: 445 Bytes

Contents

require "gogo_driver/version"
require "gogo_driver/entity"

module GogoDriver
  def go(url='https://www.google.com')
    @entity = Entity.new unless @entity
    @entity.go(url)
    @last_url = url
  end
  module_function :go

  def method_missing(method, *args, &block)
    @entity.respond_to?(method) ? @entity.send(method, *args, &block) : super
  rescue Errno::ECONNREFUSED
    go(@last_url)
    @entity.send(method, *args, &block)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gogo_driver-0.0.3 lib/gogo_driver.rb