Class: CmAdmin::Models::Tab

Inherits:
Object
  • Object
show all
Defined in:
lib/cm_admin/models/tab.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(nav_item_name, custom_action, display_if) ⇒ Tab

Returns a new instance of Tab.



7
8
9
10
11
# File 'lib/cm_admin/models/tab.rb', line 7

def initialize(nav_item_name, custom_action, display_if)
  @nav_item_name = nav_item_name
  @custom_action = custom_action
  @display_if = display_if || lambda { |arg| return true }
end

Instance Attribute Details

#custom_actionObject

Returns the value of attribute custom_action.



5
6
7
# File 'lib/cm_admin/models/tab.rb', line 5

def custom_action
  @custom_action
end

#display_ifObject

Returns the value of attribute display_if.



5
6
7
# File 'lib/cm_admin/models/tab.rb', line 5

def display_if
  @display_if
end

Returns the value of attribute nav_item_name.



5
6
7
# File 'lib/cm_admin/models/tab.rb', line 5

def nav_item_name
  @nav_item_name
end