Class: Atomy::Code::DefineMethod

Inherits:
Define show all
Defined in:
lib/atomy/code/define_method.rb

Instance Method Summary collapse

Methods inherited from Define

#initialize

Constructor Details

This class inherits a constructor from Atomy::Code::Define

Instance Method Details

#bytecode(gen, mod) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/atomy/code/define_method.rb', line 7

def bytecode(gen, mod)
  gen.push_cpath_top
  gen.find_const(:Atomy)
  gen.push_cpath_top
  gen.find_const(:Kernel)
  gen.send(:binding, 0)
  gen.push_literal(@name)
  push_branch(gen, mod)
  gen.send(:for_method!, 0)
  gen.send(:define_branch, 3)
end