Class: NotionRubyMapping::CreatedTimeProperty
- Inherits:
-
DateBaseProperty
- Object
- Property
- DateBaseProperty
- NotionRubyMapping::CreatedTimeProperty
- Defined in:
- lib/notion_ruby_mapping/properties/created_time_property.rb
Overview
CreatedTimeProperty
Constant Summary collapse
- TYPE =
"created_time"
Instance Attribute Summary
Attributes inherited from Property
#name, #property_cache, #property_id, #will_update
Instance Method Summary collapse
- #created_time ⇒ Date, Hash
-
#initialize(name, will_update: false, base_type: :page, json: nil, property_id: nil, property_cache: nil) ⇒ CreatedTimeProperty
constructor
A new instance of CreatedTimeProperty.
-
#property_values_json ⇒ Hash
Page property only methods.
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) ⇒ CreatedTimeProperty
Returns a new instance of CreatedTimeProperty.
24 25 26 27 28 29 |
# File 'lib/notion_ruby_mapping/properties/created_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
#created_time ⇒ Date, Hash
14 15 16 |
# File 'lib/notion_ruby_mapping/properties/created_time_property.rb', line 14 def created_time @json end |
#property_values_json ⇒ Hash
Page property only methods
33 34 35 36 |
# File 'lib/notion_ruby_mapping/properties/created_time_property.rb', line 33 def property_values_json assert_page_property __method__ {} end |