class

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

dirty!

Mark the block's parents as 'dirty', to force re-render on next redraw.

Source
dirty?

This is not a cached block, it always needs rendering.

Source
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>
Source
parents
Source
parents=(parents : Array(Lemonade::Block::BaseBlock))
Source
redraw(io)

TODO: doc

Source
render(io)

TODO: doc

Source