Skip to content

class Ast internal ​

Represents a template AST. Can be made from a string template or using the Hokusai::NodeBuilder DSL.

#dump(options) internal ​

dumps a string representation of the ast

Arguments ​

  • options - kwargs for modifying the dumped representation (**options)
    • :show_props - show props and events in the dump (default false)

Returns ​

Returns a string with the dumped ast

#has_else_condition? internal ​

Does this ast have an else condition?

Returns ​

Returns boolean

#else_condition_active? internal ​

Is the else condition on this ast currently active?

Returns ​

Returns boolean

#has_if_condition? internal ​

Does this ast have an if condition?

Returns ​

Returns boolean

#loop? internal ​

Does this ast have a loop?

Returns ​

Returns boolean

#slot? internal ​

Is this ast a slot?

Returns ​

Returns boolean

#virtual? internal ​

Is this ast a virtual node?

Returns ​

Returns boolean

#dynamic? internal ​

Is this ast made with Hokusai::NodeBuilder?

Returns ​

Returns boolean

#prop(name) internal ​

Get a prop by name (if one exists)

Arguments ​

  • name - Name of the prop (String)

Returns ​

Returns Hokusai::Ast::Prop or nil if none exists

#event(name) internal ​

Get a event by name (if one exists)

Arguments ​

  • name - Name of the event

Returns ​

Returns Hokusai::Ast::Event or nil if none exists