Module Atchoum::Markup
In: lib/atchoum/markup.rb

Custom Markaby markup

Methods

tag!  

Public Instance methods

[Source]

    # File lib/atchoum/markup.rb, line 6
 6:     def tag!(*args, &block)
 7:       h = args[-1]
 8:       [:href, :action, :src].each do |arg|
 9:         case h[arg]
10:         when :index
11:           h[arg] = @rendered_page == :index ? "./" : "../"
12:         else
13:           h[arg] = @rendered_page == h[arg] ? "../#{h[arg]}/" : "#{h[arg]}/"
14:         end if h[arg].is_a? Symbol
15:       end if h.is_a? Hash
16:       super
17:     end

[Validate]