Class: AIXM::Component::Lighting

Inherits:
AIXM::Component show all
Includes:
AIXM::Concerns::Association, AIXM::Concerns::Intensity, AIXM::Concerns::Remarks
Defined in:
lib/aixm/component/lighting.rb

Overview

Lighting of a runway, helipad etc

Cheat Sheet in Pseudo Code:

lighting = AIXM.lighting(
  position: POSITIONS
)
lighting.description = String or nil
lighting.intensity = INTENSITIES or nil
lighting.color = COLORS or nil
lighting.remarks = String or nil

Constant Summary collapse

POSITIONS =
{
  TDZ: :touch_down_zone,
  AIM: :aiming_point,
  CL: :center_line,
  EDGE: :edge,
  THR: :threshold,
  SWYEDGE: :stopway_edge,
  DESIG: :runway_designation,
  AFTTHR: :after_threshold,
  DISPTHR: :displaced_threshold,
  SWYCL: :stopway_center_line,
  END: :runway_end,
  SWYEND: :stopway_end,
  TWYINT: :taxiway_intersection,
  HOLDBAY: :taxyway_hold_bay,
  RTWYINT: :rapid_taxiway_intersection,
  OTHER: :other   # specify in remarks
}.freeze
COLORS =
{
  YEL: :yellow,
  RED: :red,
  WHI: :white,
  BLU: :blue,
  GRN: :green,
  PRP: :purple,
  OTHER: :other   # specify in remarks
}.freeze

Constants included from AIXM::Concerns::Intensity

AIXM::Concerns::Intensity::INTENSITIES

Instance Attribute Summary collapse

Attributes included from AIXM::Concerns::Remarks

#remarks

Attributes included from AIXM::Concerns::Intensity

#intensity

Attributes inherited from AIXM::Component

#meta

Instance Method Summary collapse

Methods included from AIXM::Concerns::Association

included

Methods included from AIXM::Concerns::HashEquality

#eql?, #hash

Methods included from AIXM::Concerns::XMLBuilder

#build_fragment, #to_uid, #to_xml

Methods included from AIXM::Concerns::Memoize

included, method

Constructor Details

#initialize(position:) ⇒ Lighting

See the cheat sheet for examples on how to create instances of this class.



84
85
86
# File 'lib/aixm/component/lighting.rb', line 84

def initialize(position:)
  self.position = position
end

Instance Attribute Details

#colorSymbol? #color=(value) ⇒ Object

Color of lights

Overloads:

  • #colorSymbol?

    Returns any of COLORS.

    Returns:

    • (Symbol, nil)

      any of COLORS

  • #color=(value) ⇒ Object

    Parameters:

    • value (Symbol, nil)

      any of COLORS



80
81
82
# File 'lib/aixm/component/lighting.rb', line 80

def color
  @color
end

#descriptionString? #description=(value) ⇒ Object

Detailed description

Overloads:

  • #descriptionString?

    Returns:

    • (String, nil)
  • #description=(value) ⇒ Object

    Parameters:

    • value (String, nil)


72
73
74
# File 'lib/aixm/component/lighting.rb', line 72

def description
  @description
end

#positionSymbol? #position=(value) ⇒ Object

Position of the lighting system

Overloads:

  • #positionSymbol?

    Returns any of POSITIONS.

    Returns:

  • #position=(value) ⇒ Object

    Parameters:



64
65
66
# File 'lib/aixm/component/lighting.rb', line 64

def position
  @position
end

Instance Method Details

#inspectString

Returns:

  • (String)


89
90
91
# File 'lib/aixm/component/lighting.rb', line 89

def inspect
  %Q(#<#{self.class} position=#{position.inspect}>)
end

#lightableAIXM::Component::Runway::Direction, ...

Returns lighted entity.



56
# File 'lib/aixm/component/lighting.rb', line 56

belongs_to :lightable