Module: TWW
- Defined in:
- lib/tww.rb,
lib/tww/rest.rb,
lib/tww/client.rb,
lib/tww/testing.rb,
lib/tww/version.rb,
lib/tww/response.rb
Defined Under Namespace
Classes: Client, REST, Response, Testing
Constant Summary
collapse
- VERSION =
'2.0.2'
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.factory ⇒ Object
Returns the value of attribute factory.
13
14
15
|
# File 'lib/tww.rb', line 13
def factory
@factory
end
|
Class Method Details
.client(options = {}) ⇒ Object
19
20
21
|
# File 'lib/tww.rb', line 19
def client(options = {})
@factory.new(@config.merge(options))
end
|
.config ⇒ Object
15
16
17
|
# File 'lib/tww.rb', line 15
def config
@config.tap { |config| yield(config) if block_given? }
end
|
.disable_testing! ⇒ Object
27
28
29
|
# File 'lib/tww.rb', line 27
def disable_testing!
@factory = TWW::REST
end
|
.enable_testing! ⇒ Object
23
24
25
|
# File 'lib/tww.rb', line 23
def enable_testing!
@factory = TWW::Testing
end
|