Module: WCC::Data

Defined in:
lib/wcc/data/version.rb,
lib/wcc/data/response.rb,
lib/wcc/data/rest_endpoint.rb,
lib/wcc/data/enumerated_type.rb,
lib/wcc/data/rack_client_app_token_auth.rb,
lib/wcc/data/faraday_client_app_token_auth.rb,
lib/wcc/data/service.rb,
lib/wcc/data/nucleus.rb,
lib/wcc/data/mapper.rb,
lib/wcc/data/config.rb,
lib/wcc/data/model.rb,
lib/wcc/data.rb

Defined Under Namespace

Modules: Mapper, Nucleus Classes: Config, EnumeratedType, FaradayClientAppTokenAuth, Model, RESTEndpoint, RackClientAppTokenAuth, Response, Service

Constant Summary collapse

VERSION =
'0.4.1'.freeze

Class Method Summary collapse

Class Method Details

.configObject



5
6
7
# File 'lib/wcc/data.rb', line 5

def self.config
  @config ||= WCC::Data::Config.new
end

.Service(hash_or_object) ⇒ Object



43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/wcc/data/service.rb', line 43

def self.Service(hash_or_object)
  case hash_or_object
  when Service
    hash_or_object
  when Hash
    Service.new(hash_or_object)
  when NilClass
    Service.new
  else
    raise ArgumentError
  end
end

.setup {|config| ... } ⇒ Object

Yields:



9
10
11
# File 'lib/wcc/data.rb', line 9

def self.setup
  yield config
end