Sha256: 031e7cb27da7171ee0e950ee08cb0594cd0f01d438dc4acb6210a831b40e54e4

Contents?: true

Size: 685 Bytes

Versions: 2

Compression:

Stored size: 685 Bytes

Contents

# frozen_string_literal: true

require_relative "easy_weibo/version"
require "easy_weibo/client"
require "easy_weibo/configuration"

require "httpx"

module EasyWeibo
  class Error < StandardError; end

  def self.configuration
    @configuration ||= Configuration.new
  end

  class << self
    attr_writer :configuration

    def configuration
      @configuration ||= Configuration.new
    end

    def configure
      yield(configuration)
    end

    def app_key
      configuration.app_key
    end

    def app_secret
      configuration.app_secret
    end

    def redirect_uri
      configuration.redirect_uri
    end

    def root
      File.dirname __dir__
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
easy_weibo-0.1.1 lib/easy_weibo.rb
easy_weibo-0.1.0 lib/easy_weibo.rb