Module: Parliament::Grom::Decorator::EuropeanRegion

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

Overview

Decorator namespace for Grom::Node instances with type: data.ordnancesurvey.co.uk/ontology/admingeo/EuropeanRegion.

Since:

  • 0.1.0

Instance Method Summary collapse

Instance Method Details

#constituency_countString

Alias count with fallback.

Returns:

  • (String, String)

    the count of the Grom::Node or nil.

Since:

  • 0.1.0



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

def constituency_count
  respond_to?(:count) ? count : nil
end

#gss_codeString

Alias gssCode with fallback.

Returns:

  • (String, String)

    the given name of the Grom::Node or nil.

Since:

  • 0.1.0



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

def gss_code
  respond_to?(:gssCode) ? gssCode : nil
end

#nameString

Alias prefLabel with fallback.

Returns:

  • (String, String)

    the given name of the Grom::Node or an empty string.

Since:

  • 0.1.0



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

def name
  respond_to?(:prefLabel) ? prefLabel : ''
end