module VG::ServiceObject

Constants

VERSION

Public Class Methods

included(so) click to toggle source
# File lib/vg/service_object.rb, line 34
def self.included(so)
  methods = so.is_a?(Class) ? ClassSingletonMethods : ModuleSingletonMethods
  return if so.singleton_class.included_modules.include?(methods)
  so.extend methods
  
  so.singleton_class.instance_eval do
    define_method(:included) { |_base| raise "Can't be included. Use #as_so method instead" }
  end if so.instance_of?(Module)
end