Module: Laser::Analysis::Utilities

Defined in:
lib/laser/analysis/laser_utils.rb

Class Method Summary (collapse)

Class Method Details

+ (Object) klass_for(arg)



5
6
7
# File 'lib/laser/analysis/laser_utils.rb', line 5

def klass_for(arg)
  LaserObject === arg ? arg.singleton_class : SingletonClassFactory.create_for(arg)
end

+ (Object) normal_class_for(arg)



13
14
15
# File 'lib/laser/analysis/laser_utils.rb', line 13

def normal_class_for(arg)
  LaserObject === arg ? arg.normal_class : ClassRegistry[arg.class.name]
end

+ (Object) type_for(arg, variance = :invariant)



9
10
11
# File 'lib/laser/analysis/laser_utils.rb', line 9

def type_for(arg, variance=:invariant)
  Types::ClassObjectType.new(klass_for(arg))
end