Module: Hyperloop::PolicyAutoLoader

Defined in:
lib/hyper-operation/transport/policy.rb

Class Method Summary collapse

Class Method Details

.load(name, value) ⇒ Object


553
554
555
556
557
# File 'lib/hyper-operation/transport/policy.rb', line 553

def self.load(name, value)
  const_get("#{name}Policy") if name && !name.end_with?("Policy".freeze) && value.is_a?(Class)
rescue Exception => e
  raise e if e.is_a?(LoadError) && e.message =~ /Unable to autoload constant #{name}Policy/
end