README.md in wrap_it-0.1.3 vs README.md in wrap_it-0.1.4

- old
+ new

@@ -146,33 +146,37 @@ #### html_class(*args) Use `html_class` DSL method to add default html classes, thats are automatically added when element created. +#### html_class_prefix(prefix) + +Sets html class prefix. It can be `Symbol` or `String` and converted to `String`. This value used with `switch` and `enum` functionality. See its descriptions below. + #### omit_content Once this method called from class, this class will ommit any text content, captured from template. For example, `<%= element do %><p>Any content</p><% end %>` normally will produce `<div><p>Any content</p></div>`. In some cases you whant to drop `<p>Any content</p>`, for exmaple, inside tables. #### switch(name, options = {}, &block) Adds `switch`. Switch is a boolean flag. When element created, creation arguments will be scanned for `Symbol`, that equals to `name`. If it founded, switch turned on. Also creation options inspected. If its contains `name: true` key-value pair, this pair removed from options and switch also turned on. `name` can be `Symbol` or `String` and it converted to `Symbol`. This method also adds getter and setter for this switch in form `name?` and `name=` respectively. -You can pass `html_class` option. If it presend, this class will be added or removed to element when switch changes its state. - +When `html_class` option specified and switch changes its state, HTML class for element will be computed as follows. if `html_class` options is `true`, html class produced from `html_class_prefix` and `name` of switch. If `html_class` is a String, Symbol or Array of this types, html class produced as array of `html_class_prefix` and each `html_class` concatinations. This classes added to element if switch is on or removed in other case. + Also `aliases` option available. So if some of aliases founded in arguments it also changes switch state. You should pass only `Symbol` or `Array` if symbols to this optioin. If block given, it will be called each time switch changes its state in context of element with the switch state as argument. #### enum(name, options = {}, &block) Adds `enum`. When element created, creation arguments will be scanned for `Symbol`, that included contains in `values`. If it founded, enum takes this value. Also creation options inspected. If its contains `name: value` key-value pair with valid value, this pair removed from options and enum takes this value. This method also adds getter and setter for this enum. -You can pass `html_class_prefix` option. If it present, HTML class will be combined from it and enum value and added or removed from element HTML class. +If you set `html_class` option to `true`, with each enum change, HTML class, composed from `html_class_prefix` and enum `value` will be added to element. If you want to override this prefix, specify it with `html_class_prefix` option. By default, enum changes are not affected to html classes. Also `aliases` option available. So if some of aliases founded in creation options keys it also changes enum value. You should pass only `Symbol` or `Array` if symbols to this optioin. `default` option sets default value for enum. This value will used if nil or invalid value assigned to enum. @@ -266,9 +270,12 @@ * Strong testing * Finish Sinatra integration * Rubydoc documentation # Changes + +`0.1.4` +* added: html_class_prefix `0.1.3` * this is a fix for 0.1.2, that it was not properly compiled. `0.1.2`