Module: AddThis

Defined in:
lib/add_this/requests.rb,
lib/add_this/client.rb,
lib/add_this/version.rb,
lib/add_this/configuration.rb

Overview

Configuration Class

this allows to you to setup all your configuration params through an initializer such as:

config/initializers/add_this.rb

Examples:

AddThis.configure do
  config.user_id    = "generalthings"
  config.password   = "password"
end

Defined Under Namespace

Modules: Requests Classes: Client, Configuration

Constant Summary collapse

VERSION =
"0.0.3"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.clientObject

attrs for storing the client object



68
69
70
# File 'lib/add_this/client.rb', line 68

def client
  @client
end

.configurationObject

Returns the value of attribute configuration.



31
32
33
# File 'lib/add_this/configuration.rb', line 31

def configuration
  @configuration
end

Class Method Details

.configure {|configuration| ... } ⇒ Boolean

Allows you to build a configure block

Parameters:

  • options (Hash)

    a customizable set of options

Yields:

Returns:

  • (Boolean)


39
40
41
42
43
# File 'lib/add_this/configuration.rb', line 39

def self.configure
  self.configuration ||= Configuration.new
  yield configuration
  true
end

.getObject

defining the client object so you can make requests on the AddThis class



72
73
74
# File 'lib/add_this/client.rb', line 72

def self.get
  self.client ||= Client.new
end