Method: SXRB::Proxy#on_start

Defined in:
lib/sxrb/proxy.rb

#on_start {|Node| ... } ⇒ nil

Defines a callback that is invoked whenever start tag is encountered.

Yields:

  • (Node)

    block receives parsed node without any nested elements. All inline attributes are available though.

Returns:

  • (nil)


82
83
84
# File 'lib/sxrb/proxy.rb', line 82

def on_start(&block)
  @callback_tree.add_callback(:start, @current_path, &block)
end