Class: RCAP::CAP_1_2::Area

Inherits:
Base::Area show all
Defined in:
lib/rcap/cap_1_2/area.rb

Overview

An Area object is valid if

  • it has an area description

  • all Circle objects contained in circles are valid

  • all Geocode objects contained in geocodes are valid

  • all Polygon objects contained in polygons are valid

  • altitude has a value if ceiling is set

Constant Summary

Constants inherited from Base::Area

Base::Area::ALTITUDE_ELEMENT_NAME, Base::Area::ALTITUDE_KEY, Base::Area::ALTITUDE_XPATH, Base::Area::ALTITUDE_YAML, Base::Area::AREA_DESC_ELEMENT_NAME, Base::Area::AREA_DESC_KEY, Base::Area::AREA_DESC_XPATH, Base::Area::AREA_DESC_YAML, Base::Area::CEILING_ELEMENT_NAME, Base::Area::CEILING_KEY, Base::Area::CEILING_XPATH, Base::Area::CEILING_YAML, Base::Area::CIRCLES_KEY, Base::Area::CIRCLES_YAML, Base::Area::GEOCODES_KEY, Base::Area::GEOCODES_YAML, Base::Area::POLYGONS_KEY, Base::Area::POLYGONS_YAML, Base::Area::XML_ELEMENT_NAME, Base::Area::XPATH

Instance Attribute Summary

Attributes inherited from Base::Area

#altitude, #area_desc, #ceiling, #circles, #geocodes, #polygons

Instance Method Summary collapse

Methods inherited from Base::Area

#==, #add_circle, #add_geocode, #add_polygon, from_h, from_xml_element, from_yaml_data, #initialize, #inspect, #to_h, #to_s, #to_xml, #to_xml_element, #to_yaml, #to_yaml_data

Methods included from Validation

#errors, included, #valid?, #validate

Constructor Details

This class inherits a constructor from RCAP::Base::Area

Instance Method Details

#circle_classClass


21
22
23
# File 'lib/rcap/cap_1_2/area.rb', line 21

def circle_class
  Circle
end

#geocode_classClass


26
27
28
# File 'lib/rcap/cap_1_2/area.rb', line 26

def geocode_class
  Geocode
end

#polygon_classClass


16
17
18
# File 'lib/rcap/cap_1_2/area.rb', line 16

def polygon_class
  Polygon
end

#xmlnsString


11
12
13
# File 'lib/rcap/cap_1_2/area.rb', line 11

def xmlns
  Alert::XMLNS
end