add parfait block

This commit is contained in:
Torsten Ruger
2018-07-07 15:50:43 +03:00
parent 9005513368
commit 2f07cc34f3
11 changed files with 83 additions and 9 deletions

View File

@ -36,5 +36,24 @@ module Parfait
block.call( self )
@next.each_method( &block ) if @next
end
def create_block(args , frame)
bl = Block.new(self_type , args , frame)
block = self.blocks
bl.next = block if(block)
@blocks = bl
end
def has_block(block)
each_block{ |bl| return true if bl == block}
false
end
def each_block(&bl)
blo = blocks
while( blo )
yield(blo)
blo = blo.next
end
end
end
end