aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/refinery/blog.rb8
-rw-r--r--lib/refinery/blog/tabs.rb16
2 files changed, 12 insertions, 12 deletions
diff --git a/lib/refinery/blog.rb b/lib/refinery/blog.rb
index af39967..326e36a 100644
--- a/lib/refinery/blog.rb
+++ b/lib/refinery/blog.rb
@@ -12,10 +12,16 @@ module Refinery
autoload :Tab, 'refinery/blog/tabs'
class << self
- attr_accessor :root
+ attr_writer :root
+ attr_writer :tabs
+
def root
@root ||= Pathname.new(File.expand_path('../../', __FILE__))
end
+
+ def tabs
+ @tabs ||= []
+ end
def version
::Refinery::Blog::Version.to_s
diff --git a/lib/refinery/blog/tabs.rb b/lib/refinery/blog/tabs.rb
index 083d50b..519b90e 100644
--- a/lib/refinery/blog/tabs.rb
+++ b/lib/refinery/blog/tabs.rb
@@ -1,11 +1,5 @@
module Refinery
- module Blog
- attr_accessor :tabs
-
- def self.tabs
- @tabs ||= []
- end
-
+ module Blog
class Tab
attr_accessor :name, :partial
@@ -18,11 +12,11 @@ module Refinery
raise "A tab MUST have a partial!: #{tab.inspect}" if tab.partial.blank?
end
- protected
+ protected
- def initialize
- ::Refinery::Blog.tabs << self # add me to the collection of registered page tabs
- end
+ 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