Class: JekyllNotion::GeneratorFactory

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

Class Method Summary collapse

Class Method Details

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



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

def self.for(db:, site:, plugin:)
  if db.data.nil?
    CollectionGenerator.new(:db => db, :site => site, :plugin => plugin)
  else
    DataGenerator.new(:db => db, :site => site, :plugin => plugin)
  end
end