Class Ezamar::Element
In: lib/ezamar/element.rb
Parent: Object

Methods

Attributes

content  [RW] 

Public Class methods

basically processes stuff like

  'foo="bar" foobar="baz"'

do NOT pass actual objects that cannot be simply read as a string here, the information will be lost.

Exceptions are true, false, Integers and Floats. They will appear in their real form (this again is also valid for strings that contain these values in a way that makes Integer/Float possible to parse them)

Just remember, walk like a duck, talk like a duck.

find the element, create an instance, pass it the content check if it responds to :render and sets instance-variables that are named after the keys and hold the values of the parameters you passed to the Element

Parameters look like:

  <Page foo="true"> bar </Page>
  <Page foo="true" />

this will be called by transform, passes along the stuff inside the tags for the element

transforms all <Element> tags within the string, takes also a binding to be compatible to the transform-pipeline, won‘t have any use for it though.

transforms elements like:

  <Page> some content </Page>

transforms elements like:

  <Page />

Public Instance methods

The method that will be called upon to render the things inside the element, you can access content from here, which contains the contents between the tags.

It should answer with a String.

[Validate]