lib/lookbook/page.rb in lookbook-1.0.0.beta.2 vs lib/lookbook/page.rb in lookbook-1.0.0.beta.3
- old
+ new
@@ -17,11 +17,11 @@
attr_reader :errors
attr_accessor :sections
def initialize(path, base_path)
@pathname = Pathname.new path
- @base_path = base_path
+ @base_path = Pathname.new base_path
@options = nil
@errors = []
@sections = []
@page_name = remove_position_prefix(path_name)
rel_path = @pathname.relative_path_from(@base_path)
@@ -175,10 +175,10 @@
PageCollection.new(sorted_pages)
end
def page_paths
- Lookbook.config.page_paths.filter { |dir| Dir.exist? dir }
+ Lookbook.config.page_paths.select { |dir| Dir.exist? dir }
end
def section_path?(path)
!!path.match(%r{\[(.*?\w+)\]})
end