Class: Lolita::Navigation::Branch
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
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Branch
constructor
A new instance of Branch.
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) =args. @name=args.first end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
38 39 40 |
# File 'lib/lolita/navigation.rb', line 38 def name @name end |