Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
renamed category collection to config
  • Loading branch information
Matthew Robertson committed Feb 13, 2013
1 parent bcab71f commit 08f5e90
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions lib/ress.rb
Expand Up @@ -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"

Expand All @@ -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
2 changes: 1 addition & 1 deletion 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
Expand Down
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion spec/ress_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit 08f5e90

Please sign in to comment.