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



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

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



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

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



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

attribute :location_id

#location_mapLocation::Map

Returns the location map the position belongs to.

Returns:



434
435
436
# File 'lib/lws/apps/presence.rb', line 434

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



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

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



444
445
446
# File 'lib/lws/apps/presence.rb', line 444

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



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

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



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

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



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

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



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

attribute :y_pos