Class Markaby::CssProxy
In: lib/markaby/cssproxy.rb
Parent: Object

Class used by Markaby::Builder to store element options. Methods called against the CssProxy object are added as element classes or IDs.

See the README for examples.

Methods

merge!   method_missing   new   to_s   to_str  

Public Class methods

Creates a CssProxy object. The opts and block passed in are stored until the element is created by Builder.tag!

Public Instance methods

Adds attributes to an element, for internal use only. For example, if you want to write a wrapper which sets a bunch of default attributes for a certain tag. Like the default `img’ method included with Markaby automatically sets an empty alt attribute.

Adds attributes to an element. Bang methods set the :id attribute. Other methods add to the :class attribute. If a block is supplied, it is executed with a merged hash (@opts + args).

to_s()

Alias for to_str

[Validate]