Class: NotionRubyMapping::UrlProperty
- Defined in:
- lib/notion_ruby_mapping/url_property.rb
Overview
UrlProperty
Constant Summary collapse
- TYPE =
"url"
Instance Attribute Summary collapse
-
#url ⇒ Object
Returns the value of attribute url.
Attributes inherited from Property
Instance Method Summary collapse
-
#initialize(name, will_update: false, url: nil) ⇒ UrlProperty
constructor
A new instance of UrlProperty.
- #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, url: nil) ⇒ UrlProperty
Returns a new instance of UrlProperty.
14 15 16 17 |
# File 'lib/notion_ruby_mapping/url_property.rb', line 14 def initialize(name, will_update: false, url: nil) super name, will_update: will_update @url = url end |
Instance Attribute Details
#url ⇒ Object
Returns the value of attribute url.
18 19 20 |
# File 'lib/notion_ruby_mapping/url_property.rb', line 18 def url @url end |
Instance Method Details
#property_values_json ⇒ Hash
27 28 29 |
# File 'lib/notion_ruby_mapping/url_property.rb', line 27 def property_values_json {@name => {"url" => @url, "type" => "url"}} end |
#update_from_json(json) ⇒ Object
21 22 23 24 |
# File 'lib/notion_ruby_mapping/url_property.rb', line 21 def update_from_json(json) @will_update = false @url = json["url"] end |