Class: CastOff::Compiler::CodeManager::CompilationTarget

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/cast_off/compile/code_manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Util

#bug, #dlog, #todo, #vlog

Constructor Details

#initialize(target, mid, singleton) ⇒ CompilationTarget

Returns a new instance of CompilationTarget.



131
132
133
134
135
136
137
# File 'lib/cast_off/compile/code_manager.rb', line 131

def initialize(target, mid, singleton)
  @target_object = target
  @method_id = mid
  @singleton_p = singleton
  bug() unless @method_id.is_a?(Symbol)
  bug() unless @singleton_p == true || @singleton_p == false
end

Instance Attribute Details

#method_idObject (readonly)

Returns the value of attribute method_id.



129
130
131
# File 'lib/cast_off/compile/code_manager.rb', line 129

def method_id
  @method_id
end

#target_objectObject (readonly)

Returns the value of attribute target_object.



129
130
131
# File 'lib/cast_off/compile/code_manager.rb', line 129

def target_object
  @target_object
end

Instance Method Details

#singleton_method?Boolean

Returns:

  • (Boolean)


139
140
141
# File 'lib/cast_off/compile/code_manager.rb', line 139

def singleton_method?
  @singleton_p
end