Class: Backstage::SidebarConfig
- Inherits:
-
Object
- Object
- Backstage::SidebarConfig
- Defined in:
- lib/backstage/sidebar_config.rb
Defined Under Namespace
Classes: SidebarLink
Instance Attribute Summary collapse
-
#links ⇒ Object
readonly
Returns the value of attribute links.
Instance Method Summary collapse
-
#initialize ⇒ SidebarConfig
constructor
A new instance of SidebarConfig.
- #link(label, url_or_proc) ⇒ Object
Constructor Details
#initialize ⇒ SidebarConfig
Returns a new instance of SidebarConfig.
7 8 9 |
# File 'lib/backstage/sidebar_config.rb', line 7 def initialize @links = [] end |
Instance Attribute Details
#links ⇒ Object (readonly)
Returns the value of attribute links.
5 6 7 |
# File 'lib/backstage/sidebar_config.rb', line 5 def links @links end |
Instance Method Details
#link(label, url_or_proc) ⇒ Object
11 12 13 |
# File 'lib/backstage/sidebar_config.rb', line 11 def link(label, url_or_proc) @links << SidebarLink.new(label, url_or_proc) end |