Module: Parliament::Grom::Decorator::ArticleType

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

Overview

Decorator namespace for Grom::Node instances with type: example.com/content/ArticleType ArticleType Grom::Node is a Contentful object associated with a web article (a WebArticle has an Audience node) ArticleType Grom::Node is not modelled in the data service, hence type ‘example..’ and not ‘id.parliament.uk/schema

Since:

  • 0.1.0

Instance Method Summary collapse

Instance Method Details

#article_type_nameString

Alias name with fallback.

Returns:

  • (String, String)

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

Since:

  • 0.1.0



11
12
13
# File 'lib/parliament/grom/decorator/article_type.rb', line 11

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