Sha256: 9f45001e34c5e6233a5cf405dc80e9ef5c140eb9c7f2835bd798a9e08fffd8d4

Contents?: true

Size: 909 Bytes

Versions: 24

Compression:

Stored size: 909 Bytes

Contents

module Parliament
  module Grom
    module Decorator
      # Decorator namespace for Grom::Node instances with type: http://data.ordnancesurvey.co.uk/ontology/admingeo/EuropeanRegion.
      # rubocop:disable ModuleLength
      module EuropeanRegion
        # Alias prefLabel with fallback.
        #
        # @return [String, String] the given name of the Grom::Node or an empty string.
        def name
          respond_to?(:prefLabel) ? prefLabel : ''
        end

        # Alias gssCode with fallback.
        #
        # @return [String, String] the given name of the Grom::Node or nil.
        def gss_code
          respond_to?(:gssCode) ? gssCode : nil
        end

        # Alias count with fallback.
        #
        # @return [String, String] the count of the Grom::Node or nil.
        def constituency_count
          respond_to?(:count) ? count : nil
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
parliament-grom-decorators-0.21.0 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.19.0 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.18.0 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.17.0 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.16.4 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.16.3 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.16.1 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.16.0 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.15.0 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.14.1 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.14.0 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.13.0 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.12.1 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.12.0 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.11.0 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.10.1 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.10.0 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.9.0 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.8.0 lib/parliament/grom/decorator/european_region.rb
parliament-grom-decorators-0.7.0 lib/parliament/grom/decorator/european_region.rb