Class: Fume::SimpleNav::HelperExtensions::SimpleNavTag

Inherits:
Hashie::Mash
  • Object
show all
Defined in:
lib/fume/simple_nav.rb

Instance Method Summary collapse

Instance Method Details

#content_tag(value, tag_name, options = {}, &block) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
# File 'lib/fume/simple_nav.rb', line 36

def (value, tag_name, options = {}, &block)
  if value == self.value
    if options[:class]
      options[:class] += " #{self.active_class}"
    else
      options[:class] = "#{self.active_class}"
    end
  end

  helper.(tag_name, options, &block)
end

#li_tag(value, options = {}, &block) ⇒ Object



32
33
34
# File 'lib/fume/simple_nav.rb', line 32

def li_tag(value, options = {}, &block)
  self.(value, :li, options, &block)
end