Class: JekyllNotion::AbstractGenerator

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

Direct Known Subclasses

CollectionGenerator, DataGenerator, PageGenerator

Instance Method Summary collapse

Constructor Details

#initialize(notion_resource:, site:, plugin:) ⇒ AbstractGenerator

Returns a new instance of AbstractGenerator.



5
6
7
8
9
# File 'lib/jekyll-notion/generators/abstract_generator.rb', line 5

def initialize(notion_resource:, site:, plugin:)
  @notion_resource = notion_resource
  @site = site
  @plugin = plugin
end

Instance Method Details

#generateObject



11
12
13
# File 'lib/jekyll-notion/generators/abstract_generator.rb', line 11

def generate
  raise "Do not use the AbstractGenerator class. Implement the generate method in a subclass."
end

#resource_idObject



15
16
17
# File 'lib/jekyll-notion/generators/abstract_generator.rb', line 15

def resource_id
  @notion_resource.id
end