Class: Jekyll::Maps::LocationFinder
- Inherits:
-
Object
- Object
- Jekyll::Maps::LocationFinder
- Defined in:
- lib/jekyll-maps/location_finder.rb
Instance Method Summary collapse
- #find(site, page) ⇒ Object
-
#initialize(options) ⇒ LocationFinder
constructor
A new instance of LocationFinder.
Constructor Details
#initialize(options) ⇒ LocationFinder
Returns a new instance of LocationFinder.
4 5 6 7 |
# File 'lib/jekyll-maps/location_finder.rb', line 4 def initialize() @documents = [] @options = end |
Instance Method Details
#find(site, page) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/jekyll-maps/location_finder.rb', line 9 def find(site, page) if @options[:attributes][:latitude] && @options[:attributes][:longitude] return [(page)] elsif @options[:filters].empty? @documents << page if with_location?(page) else site.collections.each_value { |collection| filter(collection.docs) } site_data(site).each_value { |items| traverse(items) } end documents_to_locations end |