Module: Parliament::Grom::Decorator::ConstituencyArea

Defined in:
lib/parliament/grom/decorator/constituency_area.rb

Overview

Decorator namespace for Grom::Node instances with type: id.parliament.uk/schema/ConstituencyArea

Since:

  • 0.1.0

Instance Method Summary collapse

Instance Method Details

#latitudeString

Alias constituencyAreaLatitude with fallback.

Returns:

  • (String, String)

    the latitude of the Grom::Node or an empty string.

Since:

  • 0.1.0



9
10
11
# File 'lib/parliament/grom/decorator/constituency_area.rb', line 9

def latitude
  respond_to?(:constituencyAreaLatitude) ? constituencyAreaLatitude : ''
end

#longitudeString

Alias constituencyAreaLongitude with fallback.

Returns:

  • (String, String)

    the longitude of the Grom::Node or an empty string.

Since:

  • 0.1.0



16
17
18
# File 'lib/parliament/grom/decorator/constituency_area.rb', line 16

def longitude
  respond_to?(:constituencyAreaLongitude) ? constituencyAreaLongitude : ''
end

#polygonString

Alias constituencyAreaExtent with fallback.

Returns:

  • (String, String)

    the polygon of the Grom::Node or an empty string.

Since:

  • 0.1.0



23
24
25
# File 'lib/parliament/grom/decorator/constituency_area.rb', line 23

def polygon
  respond_to?(:constituencyAreaExtent) ? constituencyAreaExtent : []
end