Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/types/types/class_type.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#ikra_type ⇒ Object
Returns the [Ikra::Types::RubyType] for this object.
Class Method Details
Instance Method Details
#ikra_type ⇒ Object
Returns the [Ikra::Types::RubyType] for this object. Instance of the same Ruby class can principally have different Ikra types. Thus, this method is defined as an instance method.
143 144 145 146 147 148 149 150 |
# File 'lib/types/types/class_type.rb', line 143 def ikra_type if self.is_a?(Module) return self.singleton_class.to_ikra_type else # TODO: Double check if we always want to have the singleton class? return self.class.to_ikra_type end end |