Lemonade::Block::BaseBlock
Inherits Reference < Object
TODO: doc
Note: Any container must add itself to the parents array of a given block. Caching & dynamic block modification in multiple blocks count on that to propagate to parents that a block is dirty.
Example of a basic container:
class Container < Lemonade::BaseBlock
@blocks = [] of Lemonade::BaseBlock
def <<(block)
block.parents << self # Add itself as a parent of the block
@blocks << block # Add the block to the container's list of block.
self
end
end
Container.new << SomeBlock.new
Constants
REMOVE_IVARS_FROM_INSPECT = ["parents"] of ::String
Instance methods
inspect(io : IO) : Nil
Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>
parents
Source