module RakutenApi

Constants

APPLICATION_END_POINT
VERSION

Public Class Methods

config()
Alias for: configuration
configuration() click to toggle source
# File lib/rakuten_api.rb, line 19
def configuration
  @configuration ||= Configuration.new
end
Also aliased as: config
configure() { |configuration| ... } click to toggle source
# File lib/rakuten_api.rb, line 15
def configure
  yield configuration
end
constantize(name) click to toggle source
# File lib/rakuten_api.rb, line 24
def constantize(name)
  names = config.send(name).split('::')
  names.shift if names.empty? || names.first.empty?

  constant = Object
  names.each do |name|
    constant = constant.const_defined?(name) ? constant.const_get(name) : constant.const_missing(name)
  end
  constant
end