Class: NotionToMd::Page::CustomProperty
- Inherits:
-
Object
- Object
- NotionToMd::Page::CustomProperty
- Defined in:
- lib/notion_to_md/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
- .rich_text(prop) ⇒ Object
- .select(prop) ⇒ Object
- .url(prop) ⇒ Object
Class Method Details
.checkbox(prop) ⇒ Object
129 130 131 |
# File 'lib/notion_to_md/page.rb', line 129 def checkbox(prop) prop.checkbox.to_s end |
.date(prop) ⇒ Object
date type properties not supported:
-
end
-
time_zone
136 137 138 |
# File 'lib/notion_to_md/page.rb', line 136 def date(prop) prop.date.start end |
.email(prop) ⇒ Object
125 126 127 |
# File 'lib/notion_to_md/page.rb', line 125 def email(prop) prop.email end |
.files(prop) ⇒ Object
113 114 115 |
# File 'lib/notion_to_md/page.rb', line 113 def files(prop) prop.files.map { |f| f.file.url } end |
.multi_select(prop) ⇒ Object
101 102 103 |
# File 'lib/notion_to_md/page.rb', line 101 def multi_select(prop) prop.multi_select.map(&:name) end |
.number(prop) ⇒ Object
121 122 123 |
# File 'lib/notion_to_md/page.rb', line 121 def number(prop) prop.number end |
.people(prop) ⇒ Object
109 110 111 |
# File 'lib/notion_to_md/page.rb', line 109 def people(prop) prop.people.map(&:name) end |
.phone_number(prop) ⇒ Object
117 118 119 |
# File 'lib/notion_to_md/page.rb', line 117 def phone_number(prop) prop.phone_number end |
.rich_text(prop) ⇒ Object
144 145 146 |
# File 'lib/notion_to_md/page.rb', line 144 def rich_text(prop) prop.rich_text.map(&:plain_text).join end |
.select(prop) ⇒ Object
105 106 107 |
# File 'lib/notion_to_md/page.rb', line 105 def select(prop) prop['select'].name end |
.url(prop) ⇒ Object
140 141 142 |
# File 'lib/notion_to_md/page.rb', line 140 def url(prop) prop.url end |