rubyx/lib/parfait/block.rb
Torsten Ruger b0aefe31fe make all instances attr read writers
unfortunately the writers have to have self.var =
otherwise it is just a local var
Also need to make the type explicit for all
Protocol included memory_length on the class for now
2018-08-11 19:15:34 +03:00

23 lines
546 B
Ruby

module Parfait
# A Block is a callable object, much like a CallableMethod.
# Surprisingly similar in fact, as the block is really only missing the name.
#
# The difference lies mostly in the way they are compiled
#
# Also both have a list of blocks defined in their scope. But this is
# notimplemented for blocks yet
#
class Block < Callable
def ==(other)
return false unless other.is_a?(Block)
super
end
def inspect
"#{self_type.object_class.name}(#{arguments_type.inspect})"
end
end
end