Sha256: d4e4d6bc6ed5c6121df4ce745d764d060a59b07da4b4da7637072afe570a4e3e

Contents?: true

Size: 793 Bytes

Versions: 1

Compression:

Stored size: 793 Bytes

Contents

require 'json'
require 'mechanize'
require 'require_all'
require_all 'lib/voipfone_client'

module VoipfoneClient
  BASE_URL = "https://www.voipfone.co.uk"
  API_GET_URL = "https://www.voipfone.co.uk/api/srv"
  API_POST_URL = "https://www.voipfone.co.uk/api/upd"

  class << self
    attr_accessor :configuration
  end

  # A module method which accepts a block, allowing us to configure the module.
  # @param [Block] the configuration block, containing the configuration variables
  def self.configure
    self.configuration ||= Configuration.new
    yield(configuration)
  end

  # A configuration class which contains the attributes we want to set in the module method
  class Configuration
    attr_accessor :username, :password, :user_agent_string

    def initialize

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
voipfone_client-0.2.0 lib/voipfone_client.rb