Class: FastRuby::Inferencer

Inherits:
Object show all
Defined in:
lib/fastruby/builder/inferencer.rb,
lib/fastruby/modules/inferencer/infer.rb,
lib/fastruby/modules/inferencer/literal.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#infer_selfObject

Returns the value of attribute infer_self.



27
28
29
# File 'lib/fastruby/modules/inferencer/literal.rb', line 27

def infer_self
  @infer_self
end

Class Method Details

.define_infer_for(node_type, &blk) ⇒ Object



32
33
34
# File 'lib/fastruby/builder/inferencer.rb', line 32

def self.define_infer_for(node_type, &blk)
  define_method_handler(:infer, &blk).condition{|tree| tree.node_type == node_type}
end