module Diplomat
Top level namespace ensures all required libraries are included and initializes the gem configration.
Constants
- VERSION
Attributes
configuration[RW]
lib_path[RW]
root_path[RW]
Public Class Methods
configure() { |configuration| ... }
click to toggle source
Build optional configuration by yielding a block to configure @yield [Diplomat::Configuration]
# File lib/diplomat.rb, line 38 def configure self.configuration ||= Diplomat::Configuration.new yield(configuration) end
require_libs(*libs)
click to toggle source
Internal: Requires internal Faraday libraries. @param *libs One or more relative String names to Faraday classes. @return [nil]
# File lib/diplomat.rb, line 15 def require_libs(*libs) libs.each do |lib| require "#{lib_path}/#{lib}" end end
Also aliased as: require_lib
Private Class Methods
method_missing(name, *args, &block)
click to toggle source
Send all other unknown commands to Diplomat::Kv
@deprecated Please use Diplomat::Kv
instead. @param name [Symbol] Method to send to Kv
@param *args List of arguments to send to Kv
@param &block block to send to Kv
@return [Object]
Calls superclass method
# File lib/diplomat.rb, line 51 def method_missing(name, *args, &block) Diplomat::Kv.new.send(name, *args, &block) || super end
respond_to_missing?(meth_id, with_private = false)
click to toggle source
Make `respond_to_missing?` fall back to super
@param meth_id [Symbol] the tested method @oaram with_private if private methods should be tested too
Calls superclass method
# File lib/diplomat.rb, line 59 def respond_to_missing?(meth_id, with_private = false) access_method?(meth_id) || super end