Class: Lolita::Navigation::Branch

Inherits:
Object
  • Object
show all
Defined in:
lib/lolita/navigation.rb

Overview

c_branch=Branch.new(:category) c_branch.mapping == Lolita.mappings #=>true c.branch.resource == Lolita.mappings.to #=>true Branch.new(:page, :path=>:action=>:new,:after=>Navigation.by_name(:category,:level=>1)) Branch.new(:user,:prepend=>Navigation.root || :level=>0 || 0) Branch.new(

Proc.new{|resource| resource.lolita.reports.by_name("statistic")},
:append=>Navigation.by_name(:category,:level=>1),
:path=>{:action=>:report,:plural=>true}

)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Branch

Returns a new instance of Branch.



40
41
42
43
44
# File 'lib/lolita/navigation.rb', line 40

def initialize(*args)
  options=args.extract_options!
  @name=args.first

end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



38
39
40
# File 'lib/lolita/navigation.rb', line 38

def name
  @name
end