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

#deep_dup, #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



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

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



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

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



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

attribute :location_id

#location_mapLocation::Map

Returns the location map the position belongs to.

Returns:



391
392
393
# File 'lib/lws/apps/presence.rb', line 391

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



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

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



401
402
403
# File 'lib/lws/apps/presence.rb', line 401

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



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

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



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

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



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

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



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

attribute :y_pos