class GemStream::Configuration

Constants

DEFAULT_API_CALL_INTERVAL
MIN_RUBYGEMS_API_INTERVAL_SECONDS

guides.rubygems.org/rubygems-org-api/#rate-limits

Attributes

api_call_interval[RW]
on_synced[RW]
on_version[RW]

Public Instance Methods

api_call_interval=(interval) click to toggle source
# File lib/gem_stream/configuration.rb, line 12
def api_call_interval=(interval)
  if interval >= MIN_RUBYGEMS_API_INTERVAL_SECONDS
    @api_call_interval = interval
  else
    raise ArgumentError, "The API call interval must not exceed #{MIN_RUBYGEMS_API_INTERVAL_SECONDS} seconds"
  end
end
on_synced=(proc) click to toggle source
# File lib/gem_stream/configuration.rb, line 28
def on_synced=(proc)
  if proc.is_a?(Proc)
    @on_synced = proc
  else
    raise ArgumentError, "Please specify a Proc for the on_synced proc"
  end
end
on_version=(proc) click to toggle source
# File lib/gem_stream/configuration.rb, line 20
def on_version=(proc)
  if proc.is_a?(Proc)
    @on_version = proc
  else
    raise ArgumentError, "Please specify a Proc for the on_version proc"
  end
end