Class: Adva::View::Tabs::Tab

Inherits:
Object
  • Object
show all
Defined in:
lib/adva/view/tabs.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/adva/view/tabs.rb', line 5

def name
  @name
end

#tabsObject (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

Returns:

  • (Boolean)


12
13
14
# File 'lib/adva/view/tabs.rb', line 12

def active?
  self == tabs.first
end

#blocksObject



16
17
18
# File 'lib/adva/view/tabs.rb', line 16

def blocks
  @blocks ||= []
end