module Frenchy
Constants
- VERSION
Public Class Methods
accept_header()
click to toggle source
# File lib/frenchy.rb, line 38 def self.accept_header @content_type_accept end
find_content_type_handler(name)
click to toggle source
# File lib/frenchy.rb, line 34 def self.find_content_type_handler(name) @content_types[name] || raise(Frenchy::Error, "No content type '#{name}' registered") end
find_service(name)
click to toggle source
# File lib/frenchy.rb, line 25 def self.find_service(name) @services[name.to_s] || raise(Frenchy::Error, "No service '#{name}' registered") end
register_content_type(name, &block)
click to toggle source
# File lib/frenchy.rb, line 29 def self.register_content_type(name, &block) @content_types[name] = block @content_type_accept = @content_types.keys.join(", ") end
register_service(name, options={})
click to toggle source
# File lib/frenchy.rb, line 21 def self.register_service(name, options={}) @services[name.to_s] = Frenchy::Client.new(name, options) end