abstract class Lemonade::Block::BaseBlock
- Lemonade::Block::BaseBlock
- Reference
- Object
Overview
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
Direct Known Subclasses
Defined in:
lemonade/block/base.crConstant Summary
-
REMOVE_IVARS_FROM_INSPECT =
["parents"] of ::String
Instance Method Summary
-
#dirty!
Mark the block's parents as 'dirty', to force re-render on next redraw.
-
#dirty?
This is not a cached block, it always needs rendering.
-
#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.
- #parents : Array(Lemonade::Block::BaseBlock)
- #parents=(parents : Array(Lemonade::Block::BaseBlock))
-
#redraw(io)
TODO doc
-
#render(io)
TODO doc
Instance Method Detail
def inspect(io : IO) : Nil
#
Description copied from class Reference
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>