Sha256: 4c443aa44c0e2c01113a35d6d788f2bab5e3f3813f18c16c1cff41b9aa0b521b

Contents?: true

Size: 464 Bytes

Versions: 12

Compression:

Stored size: 464 Bytes

Contents

module Pageflow
  module Admin
    class Tabs
      def initialize
        @tabs = {}
      end

      # @param [Symbol] resource_name  A resource name like `:entry` or `:account`
      # @param [Hash] tab_options
      def register(resource_name, tab_options)
        @tabs[resource_name] ||= []
        @tabs[resource_name] << tab_options
      end

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

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pageflow-0.11.4 lib/pageflow/admin/tabs.rb
pageflow-0.11.3 lib/pageflow/admin/tabs.rb
pageflow-0.11.2 lib/pageflow/admin/tabs.rb
pageflow-0.11.1 lib/pageflow/admin/tabs.rb
pageflow-0.11.0 lib/pageflow/admin/tabs.rb
pageflow-0.10.0 lib/pageflow/admin/tabs.rb
pageflow-0.9.2 lib/pageflow/admin/tabs.rb
pageflow-0.9.1 lib/pageflow/admin/tabs.rb
pageflow-0.9.0 lib/pageflow/admin/tabs.rb
pageflow-0.8.2 lib/pageflow/admin/tabs.rb
pageflow-0.8.1 lib/pageflow/admin/tabs.rb
pageflow-0.8.0 lib/pageflow/admin/tabs.rb