diff options
Diffstat (limited to 'lib/refinery/blog')
-rw-r--r-- | lib/refinery/blog/tabs.rb | 28 | ||||
-rw-r--r-- | lib/refinery/blog/version.rb | 4 |
2 files changed, 30 insertions, 2 deletions
diff --git a/lib/refinery/blog/tabs.rb b/lib/refinery/blog/tabs.rb new file mode 100644 index 0000000..083d50b --- /dev/null +++ b/lib/refinery/blog/tabs.rb @@ -0,0 +1,28 @@ +module Refinery + module Blog + attr_accessor :tabs + + def self.tabs + @tabs ||= [] + end + + class Tab + attr_accessor :name, :partial + + 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 + + protected + + def initialize + ::Refinery::Blog.tabs << self # add me to the collection of registered page tabs + end + end + end +end
\ No newline at end of file diff --git a/lib/refinery/blog/version.rb b/lib/refinery/blog/version.rb index 6365f94..3899eeb 100644 --- a/lib/refinery/blog/version.rb +++ b/lib/refinery/blog/version.rb @@ -2,8 +2,8 @@ module Refinery module Blog class Version @major = 1 - @minor = 4 - @tiny = 0 + @minor = 5 + @tiny = 2 class << self attr_reader :major, :minor, :tiny |