module MSP

Managed Service Provider module when included it includes the correspondent correct module to define the method_missing based on whether the class included this modeule is a Singleton or not

Public Class Methods

included(klass) click to toggle source
# File lib/MSP.rb, line 10
def self.included(klass)
  if klass.included_modules.include? Singleton
    klass.singleton_class.send(:include, MSP::SingletonService)
  else
    klass.singleton_class.send(:include, MSP::Service)
  end
end