clean up some warnings

This commit is contained in:
Lee Jarvis 2011-06-03 23:38:39 +01:00
parent 851172b5ef
commit 6a756881f9
3 changed files with 4 additions and 2 deletions

View File

@ -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 File

@ -34,6 +34,7 @@ module Jekyll
#
# Returns the Symbol priority.
def self.priority(priority = nil)
@priority ||= nil
if priority && PRIORITIES.has_key?(priority)
@priority = priority
end

View File

@ -266,7 +266,7 @@ module Jekyll
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