Class: JekyllNotion::PageFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll-notion/factories/page_factory.rb

Class Method Summary collapse

Class Method Details

.for(notion_resource:, site:, plugin:) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/jekyll-notion/factories/page_factory.rb', line 5

def self.for(notion_resource:, site:, plugin:)
  if notion_resource.data_name.nil?
    PageGenerator.new(:notion_resource => notion_resource, :site => site,
                      :plugin => plugin)
  else
    DataGenerator.new(:notion_resource => notion_resource, :site => site, :plugin => plugin)
  end
end