Class: JekyllNotion::AbstractNotionResource
- Inherits:
-
Object
- Object
- JekyllNotion::AbstractNotionResource
show all
- Defined in:
- lib/jekyll-notion/abstract_notion_resource.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of AbstractNotionResource.
5
6
7
8
|
# File 'lib/jekyll-notion/abstract_notion_resource.rb', line 5
def initialize(config:)
@notion = Notion::Client.new
@config = config
end
|
Instance Method Details
#collection_name ⇒ Object
22
23
24
|
# File 'lib/jekyll-notion/abstract_notion_resource.rb', line 22
def collection_name
raise "Do not use the AbstractGenerator class. Implement the collection_name method in a subclass."
end
|
#config ⇒ Object
10
11
12
|
# File 'lib/jekyll-notion/abstract_notion_resource.rb', line 10
def config
@config || {}
end
|
#data_name ⇒ Object
26
27
28
|
# File 'lib/jekyll-notion/abstract_notion_resource.rb', line 26
def data_name
raise "Do not use the AbstractGenerator class. Implement the data_name method in a subclass."
end
|
#fetch ⇒ Object
18
19
20
|
# File 'lib/jekyll-notion/abstract_notion_resource.rb', line 18
def fetch
raise "Do not use the AbstractNotionResource class. Implement the fetch method in a subclass."
end
|
#id ⇒ Object
14
15
16
|
# File 'lib/jekyll-notion/abstract_notion_resource.rb', line 14
def id
config["id"]
end
|