module Consumerable
Constants
- VERSION
Attributes
configuration[RW]
Public Class Methods
configure() { |configuration| ... }
click to toggle source
# File lib/consumerable.rb, line 16 def self.configure self.configuration = Consumerable::Configuration.new yield self.configuration self.configuration end
content_type_string(content_type)
click to toggle source
# File lib/consumerable.rb, line 22 def self.content_type_string(content_type) { json: 'application/json', xml: 'application/xml' }.fetch(content_type) end
eager_autoload!()
click to toggle source
Calls superclass method
# File lib/consumerable.rb, line 39 def self.eager_autoload! super Consumerable::Associations.eager_load! end
log(message)
click to toggle source
# File lib/consumerable.rb, line 10 def self.log(message) if configuration && configuration.perform_logging? configuration.logger.info("CONSUMERABLE: #{message}") end end