Class: AIXM::Feature::Airport::UsageLimitation
- Defined in:
- lib/aixm/feature/airport.rb
Overview
Limitations concerning the availability of an airport for certain flight types, aircraft types etc during specific hours.
See UsageLimitation::TYPES for recognized limitations and UsageLimitation#add_condition for recognized conditions.
Multiple conditions are joined with an implicit or whereas the specifics of a condition (aircraft, rule etc) are joined with an implicit and.
Defined Under Namespace
Classes: Condition
Constant Summary collapse
- TYPES =
{ PERMIT: :permitted, FORBID: :forbidden, RESERV: :reservation_required, OTHER: :other # specify in remarks }.freeze
Instance Attribute Summary collapse
-
#type ⇒ Object
Type of limitation.
Attributes included from Concerns::Remarks
Attributes included from Concerns::Timetable
Instance Method Summary collapse
- #add_condition {|AIXM::Feature::Airport::UsageLimitation::Condition| ... } ⇒ self
-
#airport ⇒ AIXM::Feature::Airport
Airport this usage limitation is assigned to.
-
#conditions ⇒ Array<AIXM::Feature::Airport::UsageLimitation::Condition>
Conditions for this limitation to apply.
-
#initialize(type:) ⇒ UsageLimitation
constructor
See the cheat sheet for examples on how to create instances of this class.
- #inspect ⇒ String
Methods included from Concerns::XMLBuilder
#build_fragment, #to_uid, #to_xml
Methods included from Concerns::Memoize
Methods included from Concerns::Association
Constructor Details
#initialize(type:) ⇒ UsageLimitation
See the cheat sheet for
examples on how to create instances of this class.
410 411 412 |
# File 'lib/aixm/feature/airport.rb', line 410 def initialize(type:) self.type = type end |
Instance Attribute Details
#type ⇒ Symbol #type=(value) ⇒ Object
Type of limitation
406 407 408 |
# File 'lib/aixm/feature/airport.rb', line 406 def type @type end |
Instance Method Details
#add_condition {|AIXM::Feature::Airport::UsageLimitation::Condition| ... } ⇒ self
394 |
# File 'lib/aixm/feature/airport.rb', line 394 has_many :conditions, accept: 'AIXM::Feature::Airport::UsageLimitation::Condition' do |condition| end |
#airport ⇒ AIXM::Feature::Airport
Returns airport this usage limitation is assigned to.
398 |
# File 'lib/aixm/feature/airport.rb', line 398 belongs_to :airport |
#conditions ⇒ Array<AIXM::Feature::Airport::UsageLimitation::Condition>
Returns conditions for this limitation to apply.
394 |
# File 'lib/aixm/feature/airport.rb', line 394 has_many :conditions, accept: 'AIXM::Feature::Airport::UsageLimitation::Condition' do |condition| end |
#inspect ⇒ String
415 416 417 |
# File 'lib/aixm/feature/airport.rb', line 415 def inspect %Q(#<#{self.class} type=#{type.inspect}>) end |