Class: NotionRubyMapping::CreatedTimeProperty

Inherits:
DateBaseProperty show all
Defined in:
lib/notion_ruby_mapping/created_time_property.rb

Overview

CreatedTimeProperty

Constant Summary collapse

TYPE =
"created_time"

Instance Attribute Summary

Attributes inherited from Property

#name, #will_update

Instance Method Summary collapse

Methods inherited from DateBaseProperty

#filter_after, #filter_before, #filter_does_not_equal, #filter_equals, #filter_next_month, #filter_next_week, #filter_next_year, #filter_on_or_after, #filter_on_or_before, #filter_past_month, #filter_past_week, #filter_past_year

Methods included from IsEmptyIsNotEmpty

#filter_is_empty, #filter_is_not_empty

Methods inherited from Property

#assert_database_property, #assert_page_property, #clear_will_update, create_from_json, #database?, #make_filter_query, #new_name=, #page?, #property_schema_json, #property_values_json, #remove, #type, #update_from_json, #update_property_schema_json

Constructor Details

#initialize(name, will_update: false, base_type: :page, json: nil) ⇒ CreatedTimeProperty

Returns a new instance of CreatedTimeProperty.

Parameters:

  • name (String)

    Property name

  • json (String) (defaults to: nil)

    created_time value (optional)



23
24
25
26
27
# File 'lib/notion_ruby_mapping/created_time_property.rb', line 23

def initialize(name, will_update: false, base_type: :page, json: nil)
  super name, will_update: will_update, base_type: base_type
  @json = json
  @json ||= {} if database?
end

Instance Method Details

#created_timeDate, Hash

Returns:

  • (Date, Hash)


13
14
15
# File 'lib/notion_ruby_mapping/created_time_property.rb', line 13

def created_time
  @json
end