Class: MaxApiClient::LocationAttachment
- Inherits:
-
Attachment
- Object
- Attachment
- MaxApiClient::LocationAttachment
- Defined in:
- lib/max_api_client/attachments.rb,
sig/max_api_client.rbs
Overview
Attachment wrapper for geo coordinates.
Instance Attribute Summary collapse
-
#latitude ⇒ Object
readonly
Returns the value of attribute latitude.
-
#longitude ⇒ Object
readonly
Returns the value of attribute longitude.
Instance Method Summary collapse
-
#initialize(lon:, lat:) ⇒ LocationAttachment
constructor
A new instance of LocationAttachment.
- #to_h ⇒ Object
Constructor Details
#initialize(lon:, lat:) ⇒ LocationAttachment
Returns a new instance of LocationAttachment.
86 87 88 89 90 |
# File 'lib/max_api_client/attachments.rb', line 86 def initialize(lon:, lat:) super() @longitude = lon @latitude = lat end |
Instance Attribute Details
#latitude ⇒ Object (readonly)
Returns the value of attribute latitude.
84 85 86 |
# File 'lib/max_api_client/attachments.rb', line 84 def latitude @latitude end |
#longitude ⇒ Object (readonly)
Returns the value of attribute longitude.
84 85 86 |
# File 'lib/max_api_client/attachments.rb', line 84 def longitude @longitude end |
Instance Method Details
#to_h ⇒ Object
92 93 94 |
# File 'lib/max_api_client/attachments.rb', line 92 def to_h { type: "location", latitude:, longitude: } end |