Class: Pageflow::Admin::Tabs

Inherits:
Object
  • Object
show all
Defined in:
lib/pageflow/admin/tabs.rb

Instance Method Summary collapse

Constructor Details

#initializeTabs



4
5
6
# File 'lib/pageflow/admin/tabs.rb', line 4

def initialize
  @tabs = {}
end

Instance Method Details

#find_by_resource(name) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



16
17
18
# File 'lib/pageflow/admin/tabs.rb', line 16

def find_by_resource(name)
  @tabs.fetch(name, [])
end

#register(resource_name, tab_options) ⇒ Object



10
11
12
13
# File 'lib/pageflow/admin/tabs.rb', line 10

def register(resource_name, tab_options)
  @tabs[resource_name] ||= []
  @tabs[resource_name] << tab_options
end