Class: Cheri::Builder::Generator::CherifyBuilder

Inherits:
AbstractBuilder show all
Defined in:
lib/cheri/builder/generator.rb

Overview

TypeBuilder

Direct Known Subclasses

CheriYieldBuilder

Instance Method Summary collapse

Methods included from Builder

#args, #child?, #parent?, #sym

Methods included from Frame

#any?, #block, #child?, #ctx, #inspect, #object, #parent?

Constructor Details

#initialize(mod, ctx, sym, *args, &k) ⇒ CherifyBuilder

Returns a new instance of CherifyBuilder.



81
82
83
84
85
86
# File 'lib/cheri/builder/generator.rb', line 81

def initialize(mod,ctx,sym,*args,&k)
  raise Cheri.argument_error(args.length,1) unless args.length == 1
  super(ctx,sym,*args,&k)
  @mod = mod
  @obj = args.first
end

Instance Method Details

#modObject



87
88
89
# File 'lib/cheri/builder/generator.rb', line 87

def mod
  @mod    
end

#runObject



90
91
92
93
# File 'lib/cheri/builder/generator.rb', line 90

def run
  @ctx.call(self,&@blk) if @blk
  @obj
end