Class: NotionRubyMapping::CreatedByProperty
- Inherits:
-
MultiProperty
- Object
- Property
- MultiProperty
- NotionRubyMapping::CreatedByProperty
- Defined in:
- lib/notion_ruby_mapping/created_by_property.rb
Overview
CreatedByProperty
Constant Summary collapse
- TYPE =
"created_by"
Instance Attribute Summary collapse
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Attributes inherited from Property
Instance Method Summary collapse
-
#initialize(name, json: nil, user_id: nil) ⇒ CreatedByProperty
constructor
A new instance of CreatedByProperty.
-
#property_values_json ⇒ Hash
{} created_time cannot be updated.
- #update_from_json(json) ⇒ Object
Methods included from IsEmptyIsNotEmpty
#filter_is_empty, #filter_is_not_empty
Methods included from ContainsDoesNotContain
#filter_contains, #filter_does_not_contain
Methods inherited from Property
create_from_json, #make_filter_query, #type
Constructor Details
#initialize(name, json: nil, user_id: nil) ⇒ CreatedByProperty
Returns a new instance of CreatedByProperty.
11 12 13 14 |
# File 'lib/notion_ruby_mapping/created_by_property.rb', line 11 def initialize(name, json: nil, user_id: nil) super name, will_update: false @user = UserObject.new user_id: user_id, json: json end |
Instance Attribute Details
#user ⇒ Object (readonly)
Returns the value of attribute user.
15 16 17 |
# File 'lib/notion_ruby_mapping/created_by_property.rb', line 15 def user @user end |
Instance Method Details
#property_values_json ⇒ Hash
Returns {} created_time cannot be updated.
24 25 26 |
# File 'lib/notion_ruby_mapping/created_by_property.rb', line 24 def property_values_json {} end |
#update_from_json(json) ⇒ Object
18 19 20 21 |
# File 'lib/notion_ruby_mapping/created_by_property.rb', line 18 def update_from_json(json) @will_update = false @user = UserObject.new json: json["created_by"] end |