Module: Radioactive

Defined in:
lib/radioactive.rb,
lib/radioactive/errors.rb,
lib/radioactive/result.rb,
lib/radioactive/fetcher.rb,
lib/radioactive/version.rb,
lib/radioactive/address_check.rb,
lib/radioactive/monotonic_clock.rb

Defined Under Namespace

Modules: AddressCheck, MonotonicClock Classes: AddressError, EncodingError, Error, Fetcher, RedirectError, ResponseError, Result, SchemeError, SizeError, TimeoutError

Constant Summary collapse

VERSION =
"0.1.1"

Class Method Summary collapse

Class Method Details

.fetch(url, **opts) ⇒ Object



11
12
13
# File 'lib/radioactive.rb', line 11

def self.fetch(url, **opts)
  Fetcher.new(**opts).fetch(url)
end

.open(url, **opts, &block) ⇒ Object



15
16
17
18
# File 'lib/radioactive.rb', line 15

def self.open(url, **opts, &block)
  fetcher = Fetcher.new(**opts)
  block ? fetcher.open(url, &block) : fetcher.open(url)
end