Class: NotionRubyMapping::NumberProperty
- Includes:
- EqualsDoesNotEqual, GreaterThanLessThan, IsEmptyIsNotEmpty
- Defined in:
- lib/notion_ruby_mapping/number_property.rb
Overview
Number property
Constant Summary collapse
- TYPE =
"number"
Instance Attribute Summary collapse
-
#number ⇒ Object
Returns the value of attribute number.
Attributes inherited from Property
Instance Method Summary collapse
- #create_json ⇒ Hash
-
#initialize(name, json: nil, number: nil) ⇒ NumberProperty
constructor
A new instance of NumberProperty.
Methods included from IsEmptyIsNotEmpty
#filter_is_empty, #filter_is_not_empty
Methods included from GreaterThanLessThan
#filter_greater_than, #filter_greater_than_or_equal_to, #filter_less_than, #filter_less_than_or_equal_to
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, json: nil, number: nil) ⇒ NumberProperty
Returns a new instance of NumberProperty.
14 15 16 17 |
# File 'lib/notion_ruby_mapping/number_property.rb', line 14 def initialize(name, json: nil, number: nil) super(name, json: json) @number = number end |
Instance Attribute Details
#number ⇒ Object
Returns the value of attribute number.
18 19 20 |
# File 'lib/notion_ruby_mapping/number_property.rb', line 18 def number @number end |
Instance Method Details
#create_json ⇒ Hash
21 22 23 |
# File 'lib/notion_ruby_mapping/number_property.rb', line 21 def create_json {"number" => @number || @json} end |