class EasyPing::Config

Constants

OPTIONS

Attributes

api_base[RW]
api_key[RW]

Public Class Methods

new(options) click to toggle source
# File lib/easy_ping/config.rb, line 7
def initialize(options)
  options.each do |key, val|
    self.send("#{key}=", val) if self.respond_to?("#{key}=")
  end
end

Public Instance Methods

to_options() click to toggle source
# File lib/easy_ping/config.rb, line 17
def to_options
  options = {}
  values = OPTIONS.map { |key| self.send key }
  OPTIONS.zip(values) { |k,v| options[k.to_s] = v }
  options
end