Class: JekyllNotion::NotionPage::CustomProperty
- Inherits:
-
Object
- Object
- JekyllNotion::NotionPage::CustomProperty
- Defined in:
- lib/jekyll-notion/notion_page.rb
Class Method Summary collapse
- .checkbox(prop) ⇒ Object
-
.date(prop) ⇒ Object
date type properties not supported: - end - time_zone.
- .email(prop) ⇒ Object
- .files(prop) ⇒ Object
- .multi_select(prop) ⇒ Object
- .number(prop) ⇒ Object
- .people(prop) ⇒ Object
- .phone_number(prop) ⇒ Object
- .select(prop) ⇒ Object
Class Method Details
.checkbox(prop) ⇒ Object
106 107 108 |
# File 'lib/jekyll-notion/notion_page.rb', line 106 def checkbox(prop) prop.checkbox.to_s end |
.date(prop) ⇒ Object
date type properties not supported:
-
end
-
time_zone
113 114 115 |
# File 'lib/jekyll-notion/notion_page.rb', line 113 def date(prop) prop.date.start end |
.email(prop) ⇒ Object
102 103 104 |
# File 'lib/jekyll-notion/notion_page.rb', line 102 def email(prop) prop.email end |
.files(prop) ⇒ Object
89 90 91 92 |
# File 'lib/jekyll-notion/notion_page.rb', line 89 def files(prop) files = prop.files.map { |f| f.file.url }.join(", ") "[#{files}]" end |
.multi_select(prop) ⇒ Object
75 76 77 78 |
# File 'lib/jekyll-notion/notion_page.rb', line 75 def multi_select(prop) multi_select = prop.multi_select.map(&:name).join(", ") "[#{multi_select}]" end |
.number(prop) ⇒ Object
98 99 100 |
# File 'lib/jekyll-notion/notion_page.rb', line 98 def number(prop) prop.number end |
.people(prop) ⇒ Object
84 85 86 87 |
# File 'lib/jekyll-notion/notion_page.rb', line 84 def people(prop) people = prop.people.map(&:name).join(", ") "[#{people}]" end |
.phone_number(prop) ⇒ Object
94 95 96 |
# File 'lib/jekyll-notion/notion_page.rb', line 94 def phone_number(prop) prop.phone_number end |
.select(prop) ⇒ Object
80 81 82 |
# File 'lib/jekyll-notion/notion_page.rb', line 80 def select(prop) prop["select"].name end |