Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

renamed category collection to config

  • Loading branch information...
commit 08f5e908e31f6e33873ec5317c8a390db52af8ca 1 parent bcab71f
@matthewrobertson authored
View
14 lib/ress.rb
@@ -4,7 +4,7 @@
require "ress/subdomain"
require "ress/alternate_version"
require "ress/canonical_version"
-require "ress/category_collection"
+require "ress/config"
require "ress/controller_additions"
require "ress/view_helpers"
@@ -15,24 +15,24 @@
module Ress
extend self
- def category_collection
- @categories ||= CategoryCollection.new
+ def config
+ @categories ||= Config.new
end
def canonical_version
- category_collection.canonical_version
+ config.canonical_version
end
def alternate_versions
- category_collection.alternate_versions
+ config.alternate_versions
end
def include_modernizr?
- category_collection.include_modernizr
+ config.include_modernizr
end
def configure
- yield(category_collection)
+ yield(config)
end
end
View
2  lib/ress/category_collection.rb → lib/ress/config.rb
@@ -1,6 +1,6 @@
module Ress
- class CategoryCollection
+ class Config
attr_accessor :include_modernizr
attr_reader :canonical_version, :alternate_versions
View
4 spec/ress/category_collection_spec.rb → spec/ress/config_spec.rb
@@ -1,8 +1,8 @@
require_relative '../../lib/ress'
-describe Ress::CategoryCollection do
+describe Ress::Config do
- let(:collection) { Ress::CategoryCollection.new }
+ let(:collection) { Ress::Config.new }
describe '#add_alternate' do
View
2  spec/ress_spec.rb
@@ -5,7 +5,7 @@
describe '.configure' do
it 'yields the default category collection' do
- Ress.configure { |r| r.should be_a(Ress::CategoryCollection) }
+ Ress.configure { |r| r.should be_a(Ress::Config) }
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.