Class: SirvRestApi::PointOfInterest
- Inherits:
-
Object
- Object
- SirvRestApi::PointOfInterest
- Defined in:
- lib/sirv_rest_api/models.rb
Overview
Point of interest
Instance Attribute Summary collapse
-
#frame ⇒ Object
Returns the value of attribute frame.
-
#name ⇒ Object
Returns the value of attribute name.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ PointOfInterest
constructor
A new instance of PointOfInterest.
- #to_h ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ PointOfInterest
Returns a new instance of PointOfInterest.
266 267 268 269 270 271 |
# File 'lib/sirv_rest_api/models.rb', line 266 def initialize(data = {}) @name = data["name"] @x = data["x"] @y = data["y"] @frame = data["frame"] end |
Instance Attribute Details
#frame ⇒ Object
Returns the value of attribute frame.
264 265 266 |
# File 'lib/sirv_rest_api/models.rb', line 264 def frame @frame end |
#name ⇒ Object
Returns the value of attribute name.
264 265 266 |
# File 'lib/sirv_rest_api/models.rb', line 264 def name @name end |
#x ⇒ Object
Returns the value of attribute x.
264 265 266 |
# File 'lib/sirv_rest_api/models.rb', line 264 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
264 265 266 |
# File 'lib/sirv_rest_api/models.rb', line 264 def y @y end |
Instance Method Details
#to_h ⇒ Object
273 274 275 276 277 278 279 280 |
# File 'lib/sirv_rest_api/models.rb', line 273 def to_h { name: @name, x: @x, y: @y, frame: @frame }.compact end |