Module: Kybus::Client::Format
- Extended by:
- DRY::ResourceInjector
- Defined in:
- lib/kybus/client/format/format.rb,
lib/kybus/client/format/json_format.rb,
lib/kybus/client/format/url_encoded.rb
Overview
Singleton storing all the formats implemented for http clients.
Defined Under Namespace
Classes: JSONFormat, URLEncodedFormat
Class Method Summary collapse
Class Method Details
.build(config) ⇒ Object
12 13 14 |
# File 'lib/kybus/client/format/format.rb', line 12 def build(config) resource(:formats, config[:format] || 'json').new end |
.register_format(name, klass) ⇒ Object
16 17 18 |
# File 'lib/kybus/client/format/format.rb', line 16 def register_format(name, klass) register(:formats, name, klass) end |