Class: NotionRubyMapping::LastEditedTimeProperty

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

Overview

LastEditedTimeProperty

Constant Summary collapse

TYPE =
"last_edited_time"

Instance Attribute Summary

Attributes inherited from Property

#name, #property_cache, #property_id, #will_update

Instance Method Summary collapse

Methods inherited from DateBaseProperty

date_from_obj, #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, #filter_this_week, start_end_time, value_str, #value_str

Methods included from IsEmptyIsNotEmpty

#filter_is_empty, #filter_is_not_empty

Methods inherited from Property

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

Constructor Details

#initialize(name, will_update: false, base_type: "page", json: nil, property_id: nil, property_cache: nil) ⇒ LastEditedTimeProperty

Returns a new instance of LastEditedTimeProperty.

Parameters:

  • name (String, Symbol)

    Property name

  • json (String) (defaults to: nil)

    last_edited_time value (optional)



24
25
26
27
28
29
# File 'lib/notion_ruby_mapping/properties/last_edited_time_property.rb', line 24

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

Instance Method Details

#last_edited_timeDate, Hash



14
15
16
# File 'lib/notion_ruby_mapping/properties/last_edited_time_property.rb', line 14

def last_edited_time
  @json
end

#property_values_jsonHash

Page property only methods

Returns:

  • (Hash)


33
34
35
36
# File 'lib/notion_ruby_mapping/properties/last_edited_time_property.rb', line 33

def property_values_json
  assert_page_property __method__
  {}
end