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



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

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



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

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



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

attribute :location_id

#location_mapLocation::Map

Returns the location map the position belongs to.

Returns:



292
293
294
# File 'lib/lws/apps/presence.rb', line 292

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



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

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



302
303
304
# File 'lib/lws/apps/presence.rb', line 302

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



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

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



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

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



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

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



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

attribute :y_pos