Class: NotionRubyMapping::EmailProperty
- Defined in:
- lib/notion_ruby_mapping/email_property.rb
Overview
EmailProperty
Constant Summary collapse
- TYPE =
"email"
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
Attributes inherited from Property
Instance Method Summary collapse
-
#initialize(name, will_update: false, email: nil) ⇒ EmailProperty
constructor
A new instance of EmailProperty.
- #property_values_json ⇒ Hash
- #update_from_json(json) ⇒ Object
Methods included from IsEmptyIsNotEmpty
#filter_is_empty, #filter_is_not_empty
Methods included from StartsWithEndsWith
#filter_ends_with, #filter_starts_with
Methods included from ContainsDoesNotContain
#filter_contains, #filter_does_not_contain
Methods included from EqualsDoesNotEqual
#filter_does_not_equal, #filter_equals
Methods inherited from Property
create_from_json, #make_filter_query, #type
Constructor Details
#initialize(name, will_update: false, email: nil) ⇒ EmailProperty
Returns a new instance of EmailProperty.
14 15 16 17 |
# File 'lib/notion_ruby_mapping/email_property.rb', line 14 def initialize(name, will_update: false, email: nil) super name, will_update: will_update @email = email end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
18 19 20 |
# File 'lib/notion_ruby_mapping/email_property.rb', line 18 def email @email end |
Instance Method Details
#property_values_json ⇒ Hash
27 28 29 |
# File 'lib/notion_ruby_mapping/email_property.rb', line 27 def property_values_json {@name => {"email" => @email, "type" => "email"}} end |
#update_from_json(json) ⇒ Object
21 22 23 24 |
# File 'lib/notion_ruby_mapping/email_property.rb', line 21 def update_from_json(json) @will_update = false @email = json["email"] end |