module Wsnaps

Attributes

api_tocken[W]
connection_options[RW]
consumer_key[W]
consumer_secret[W]
endpoint[RW]
identity_map[RW]
middleware[RW]
oauth_token[W]
oauth_token_secret[W]

Public Class Methods

api_tocken() click to toggle source
# File lib/wsnaps.rb, line 41
def api_tocken
  @api_tocken
end
client() click to toggle source
# File lib/wsnaps.rb, line 58
def client
  @client ||= WorkSnaps::Client.new
end
configure() { |self| ... } click to toggle source
# File lib/wsnaps.rb, line 45
def configure
  yield self
  self
end
keys() click to toggle source
# File lib/wsnaps.rb, line 18
def keys
  @keys ||= [
    :api_tocken,
    :consumer_key,
    :consumer_secret,
    :oauth_token,
    :oauth_token_secret,
    :endpoint,
    :connection_options,
    :identity_map,
    :middleware,
  ]
end
method_missing(method_name, *args, &block) click to toggle source
Calls superclass method
# File lib/wsnaps.rb, line 65
def method_missing(method_name, *args, &block)
  return super unless client.respond_to?(method_name)
  client.send(method_name, *args, &block)
end
oauth_credentials() click to toggle source
# File lib/wsnaps.rb, line 32
def oauth_credentials
  {
    :consumer_key => @consumer_key,
    :consumer_secret => @consumer_secret,
    :token => @oauth_token,
    :token_secret => @oauth_token_secret,
  }
end
reset!() click to toggle source
# File lib/wsnaps.rb, line 50
def reset!
  keys.each do |key|
    instance_variable_set(:"@#{key}", WorkSnaps::Default.options[key])
  end
  self
end
Also aliased as: setup
respond_to?(method_name, include_private=false) click to toggle source
Calls superclass method
# File lib/wsnaps.rb, line 63
def respond_to?(method_name, include_private=false); client.respond_to?(method_name, include_private) || super; end
respond_to_missing?(method_name, include_private=false) click to toggle source
# File lib/wsnaps.rb, line 62
def respond_to_missing?(method_name, include_private=false); client.respond_to?(method_name, include_private); end
setup()
Alias for: reset!
snap() click to toggle source
# File lib/wsnaps.rb, line 14
def snap
  puts "-- snap --"
end