Methods

Class Index [+]

Quicksearch

Ramaze::Helper::Markaby

Allows you to use some shortcuts for markaby in your Controller.

Public Instance Methods

mab(ivs = {}, helpers = nil, &block) click to toggle source
Alias for: markaby
markaby(ivs = {}, helpers = nil, &block) click to toggle source

Use this inside your controller to directly build Markaby Refer to the Markaby-documentation and testsuite for more examples.

@example

 mab { h1 "Apples & Oranges"}  #=> "<h1>Apples &amp; Oranges</h1>"
 mab { h1 'Apples', :class => 'fruits&floots' }
    # File lib/ramaze/helper/markaby.rb, line 16
16:       def markaby(ivs = {}, helpers = nil, &block)
17:         builder = ::Markaby::Builder
18:         builder.extend(Ramaze::Helper::Methods)
19:         builder.send(:helper, :link)
20: 
21:         iv_hash = {}
22:         instance_variables.each do |iv|
23:           key, value = iv.gsub('@', '').to_sym, instance_variable_get(iv)
24:           iv_hash[key] = value
25:         end
26: 
27:         builder.new(iv_hash.merge(ivs), helpers, &block).to_s
28:       end
Also aliased as: mab

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.