module Shoplo

Constants

VERSION

Attributes

api_key[RW]

@!attribute api_key @return [String] the API key that is registered with Shoplo

secret[RW]

@!attribute secret @return [String] the secret that is registered with Shoplo

Public Class Methods

client(access_token, token_secret) click to toggle source
# File lib/shoplo.rb, line 22
def client(access_token, token_secret)
  @client ||= Shoplo::Client.new(access_token, token_secret)
end
configure() { |self| ... } click to toggle source

Configuration interface of the gem

@yield [self] to accept configuration settings

# File lib/shoplo.rb, line 17
def configure
  yield self
  true
end
respond_to_missing?(method_name, include_private=false) click to toggle source

Makes sure that the method missing is checked with the Shoplo::Client instance

@param method_name [String] the name of the method we want to run @param include_private [Boolean] defines whether to check for private functions as well

# File lib/shoplo.rb, line 31
def respond_to_missing?(method_name, include_private=false)
  client.respond_to?(method_name, include_private)
end

Private Class Methods

method_missing(method_name, *args, &block) click to toggle source

executes any function on the Shoplo::Client instance

@param args [*] any argument that we want to pass to the client function @param block [Block] any block that is passed to the client function

Calls superclass method
# File lib/shoplo.rb, line 41
def method_missing(method_name, *args, &block)
  return super unless client.respond_to?(method_name)
  client.send(method_name, *args, &block)
end