class Refinery::Blog::Tab

Attributes

name[RW]
partial[RW]

Public Class Methods

new() click to toggle source
# File lib/refinery/blog/tabs.rb, line 17
def initialize
  ::Refinery::Blog.tabs << self # add me to the collection of registered page tabs
end
register() { |tab| ... } click to toggle source
# File lib/refinery/blog/tabs.rb, line 6
def self.register(&block)
  tab = self.new

  yield tab

  raise "A tab MUST have a name!: #{tab.inspect}" if tab.name.blank?
  raise "A tab MUST have a partial!: #{tab.inspect}" if tab.partial.blank?
end