Class: Duby::Compiler::JVM::ImplicitSelf

Inherits:
Object
  • Object
show all
Defined in:
lib/duby/jvm/compiler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ ImplicitSelf

Returns a new instance of ImplicitSelf.



47
48
49
# File 'lib/duby/jvm/compiler.rb', line 47

def initialize(type)
  @inferred_type = type
end

Instance Attribute Details

#inferred_typeObject (readonly)

Returns the value of attribute inferred_type.



45
46
47
# File 'lib/duby/jvm/compiler.rb', line 45

def inferred_type
  @inferred_type
end

Instance Method Details

#compile(compiler, expression) ⇒ Object



51
52
53
# File 'lib/duby/jvm/compiler.rb', line 51

def compile(compiler, expression)
  compiler.compile_self if expression
end