Module: Rhosync

Defined in:
lib/rhosync/client.rb,
lib/rhosync/version.rb,
lib/rhosync/resource.rb,
lib/rhosync/configuration.rb

Defined Under Namespace

Modules: Resource Classes: Client, Configuration

Constant Summary

VERSION =
"0.1.0"

Class Attribute Summary (collapse)

Class Method Summary (collapse)

Class Attribute Details

+ (Object) configuration

Returns the value of attribute configuration



12
13
14
# File 'lib/rhosync/configuration.rb', line 12

def configuration
  @configuration
end

Class Method Details

+ (Object) configure {|configuration| ... }

Configure RhoSync in an initializer: like config/initializers/rhosync.rb

Setup the RhoSync uri and api token. Use rhosync:get_token to get the token value.

config.uri   = "http://myrhosync.com"
config.token = "secrettoken"

Examples:

Rhosync.configure do |config|
  config.uri   = "http://myrhosync.com"
  config.token = "secrettoken"
end

Yields:



29
30
31
32
# File 'lib/rhosync/configuration.rb', line 29

def self.configure
  self.configuration ||= Configuration.new
  yield(configuration)
end