Class: SirvRestApi::PointOfInterest

Inherits:
Object
  • Object
show all
Defined in:
lib/sirv_rest_api/models.rb

Overview

Point of interest

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#frameObject

Returns the value of attribute frame.



264
265
266
# File 'lib/sirv_rest_api/models.rb', line 264

def frame
  @frame
end

#nameObject

Returns the value of attribute name.



264
265
266
# File 'lib/sirv_rest_api/models.rb', line 264

def name
  @name
end

#xObject

Returns the value of attribute x.



264
265
266
# File 'lib/sirv_rest_api/models.rb', line 264

def x
  @x
end

#yObject

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_hObject



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