clean up some warnings
This commit is contained in:
parent
851172b5ef
commit
6a756881f9
|
@ -3,8 +3,9 @@ module Jekyll
|
||||||
class Page
|
class Page
|
||||||
include Convertible
|
include Convertible
|
||||||
|
|
||||||
|
attr_writer :dir
|
||||||
attr_accessor :site, :pager
|
attr_accessor :site, :pager
|
||||||
attr_accessor :name, :ext, :basename, :dir
|
attr_accessor :name, :ext, :basename
|
||||||
attr_accessor :data, :content, :output
|
attr_accessor :data, :content, :output
|
||||||
|
|
||||||
# Initialize a new Page.
|
# Initialize a new Page.
|
||||||
|
|
|
@ -34,6 +34,7 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns the Symbol priority.
|
# Returns the Symbol priority.
|
||||||
def self.priority(priority = nil)
|
def self.priority(priority = nil)
|
||||||
|
@priority ||= nil
|
||||||
if priority && PRIORITIES.has_key?(priority)
|
if priority && PRIORITIES.has_key?(priority)
|
||||||
@priority = priority
|
@priority = priority
|
||||||
end
|
end
|
||||||
|
|
|
@ -266,7 +266,7 @@ module Jekyll
|
||||||
def post_attr_hash(post_attr)
|
def post_attr_hash(post_attr)
|
||||||
# Build a hash map based on the specified post attribute ( post attr =>
|
# Build a hash map based on the specified post attribute ( post attr =>
|
||||||
# array of posts ) then sort each array in reverse order.
|
# 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 } }
|
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.values.map { |sortme| sortme.sort! { |a, b| b <=> a } }
|
||||||
hash
|
hash
|
||||||
|
|
Loading…
Reference in New Issue