Class: LWS::Presence::Location::Map::Position

Inherits:
Generic::Model
  • Object
show all
Defined in:
lib/lws/apps/presence.rb

Overview

Note:

This class is only used within the context of the LWS::Presence::Location::Map class.

The map position class

Instance Attribute Summary collapse

Attributes inherited from Generic::Model

#created_at, #id, #updated_at, #url, #url_html

Method Summary

Methods inherited from Generic::Model

#dig, #reload, #rollback, #save

Instance Attribute Details

#heightInteger

Returns the height of the position on the map in percentage.

Returns:

  • (Integer)

    the height of the position on the map in percentage



318
# File 'lib/lws/apps/presence.rb', line 318

attribute :height

#locationLocation

Returns the location of the map this position is associated with.

Returns:

  • (Location)

    the location of the map this position is associated with



323
# File 'lib/lws/apps/presence.rb', line 323

belongs_to :location

#location_idLocation

Returns the ID of the location of the location map this position is associated with.

Returns:

  • (Location)

    the ID of the location of the location map this position is associated with



328
# File 'lib/lws/apps/presence.rb', line 328

attribute :location_id

#location_mapLocation::Map

Returns the location map the position belongs to.

Returns:



332
333
334
# File 'lib/lws/apps/presence.rb', line 332

belongs_to :location_map, class_name: "LWS::Presence::Location::Map",
foreign_key: "location_map_id",
uri: "locations/:location_id/maps/:id"

#location_map_idInteger

Returns the ID of the location map the position belongs to.

Returns:

  • (Integer)

    the ID of the location map the position belongs to



338
# File 'lib/lws/apps/presence.rb', line 338

attribute :location_map_id

#tracking_locationLocation

Returns the location the position tracks on the map.

Returns:

  • (Location)

    the location the position tracks on the map



342
343
344
# File 'lib/lws/apps/presence.rb', line 342

belongs_to :tracking_location, class_name: "LWS::Presence::Location",
foreign_key: "tracking_location_id",
uri: "locations/:id"

#tracking_location_idInteger

Returns the ID of the location the position tracks on the map.

Returns:

  • (Integer)

    the ID of the location the position tracks on the map



348
# File 'lib/lws/apps/presence.rb', line 348

attribute :tracking_location_id

#widthInteger

Returns the width of the position on the map in percentage.

Returns:

  • (Integer)

    the width of the position on the map in percentage



352
# File 'lib/lws/apps/presence.rb', line 352

attribute :width

#x_posInteger

Returns the x_pos of the position on the map in percentage.

Returns:

  • (Integer)

    the x_pos of the position on the map in percentage



356
# File 'lib/lws/apps/presence.rb', line 356

attribute :x_pos

#y_posInteger

Returns the y_pos of the position on the map in percentage.

Returns:

  • (Integer)

    the y_pos of the position on the map in percentage



360
# File 'lib/lws/apps/presence.rb', line 360

attribute :y_pos