Permalink
Browse files

clean up some warnings

  • Loading branch information...
1 parent 851172b commit 6a756881f920008e40f2894e5044c7a16444e9af Lee Jarvis committed Jun 3, 2011
Showing with 4 additions and 2 deletions.
  1. +2 −1 lib/jekyll/page.rb
  2. +1 −0 lib/jekyll/plugin.rb
  3. +1 −1 lib/jekyll/site.rb
View
@@ -3,8 +3,9 @@ module Jekyll
class Page
include Convertible
+ attr_writer :dir
attr_accessor :site, :pager
- attr_accessor :name, :ext, :basename, :dir
+ attr_accessor :name, :ext, :basename
attr_accessor :data, :content, :output
# Initialize a new Page.
View
@@ -34,6 +34,7 @@ def self.subclasses
#
# Returns the Symbol priority.
def self.priority(priority = nil)
+ @priority ||= nil
if priority && PRIORITIES.has_key?(priority)
@priority = priority
end
View
@@ -266,7 +266,7 @@ def write
def post_attr_hash(post_attr)
# Build a hash map based on the specified post attribute ( post attr =>
# array of posts ) then sort each array in reverse order.
- hash = Hash.new { |hash, key| hash[key] = Array.new }
+ hash = Hash.new { |hsh, key| hsh[key] = Array.new }
self.posts.each { |p| p.send(post_attr.to_sym).each { |t| hash[t] << p } }
hash.values.map { |sortme| sortme.sort! { |a, b| b <=> a } }
hash

0 comments on commit 6a75688

Please sign in to comment.