Class: Adva::View::Tabs::Tab
- Inherits:
-
Object
- Object
- Adva::View::Tabs::Tab
- Defined in:
- lib/adva/view/tabs.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#tabs ⇒ Object
readonly
Returns the value of attribute tabs.
Instance Method Summary collapse
- #active? ⇒ Boolean
- #blocks ⇒ Object
-
#initialize(tabs, name) ⇒ Tab
constructor
A new instance of Tab.
Constructor Details
#initialize(tabs, name) ⇒ Tab
Returns a new instance of Tab.
7 8 9 10 |
# File 'lib/adva/view/tabs.rb', line 7 def initialize(tabs, name) @tabs = tabs @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/adva/view/tabs.rb', line 5 def name @name end |
#tabs ⇒ Object (readonly)
Returns the value of attribute tabs.
5 6 7 |
# File 'lib/adva/view/tabs.rb', line 5 def tabs @tabs end |
Instance Method Details
#active? ⇒ Boolean
12 13 14 |
# File 'lib/adva/view/tabs.rb', line 12 def active? self == tabs.first end |
#blocks ⇒ Object
16 17 18 |
# File 'lib/adva/view/tabs.rb', line 16 def blocks @blocks ||= [] end |