Module: Parliament::Grom::Decorator::WebArticle
- Defined in:
- lib/parliament/grom/decorator/web_article.rb
Overview
Decorator namespace for Grom::Node instances with type: id.parliament.uk/schema/ConstituencyArea
Instance Method Summary collapse
-
#article_body ⇒ String
Alias body with fallback.
-
#article_summary ⇒ String
Alias summary with fallback.
-
#article_title ⇒ String
Alias title with fallback.
-
#audiences ⇒ Array
Alias audience with fallback.
-
#collections ⇒ Array
Alias articleHasCollection with fallback.
-
#publishers ⇒ Array
Alias publisher with fallback.
-
#related_articles ⇒ Array
Alias relatedArticle with fallback.
-
#topics ⇒ Array
Alias topic with fallback.
-
#types ⇒ Array
Alias articleType with fallback.
Instance Method Details
#article_body ⇒ String
Alias body with fallback.
23 24 25 |
# File 'lib/parliament/grom/decorator/web_article.rb', line 23 def article_body respond_to?(:body) ? body : '' end |
#article_summary ⇒ String
Alias summary with fallback.
16 17 18 |
# File 'lib/parliament/grom/decorator/web_article.rb', line 16 def article_summary respond_to?(:summary) ? summary : '' end |
#article_title ⇒ String
Alias title with fallback.
9 10 11 |
# File 'lib/parliament/grom/decorator/web_article.rb', line 9 def article_title respond_to?(:title) ? title : '' end |
#audiences ⇒ Array
Alias audience with fallback.
44 45 46 |
# File 'lib/parliament/grom/decorator/web_article.rb', line 44 def audiences respond_to?(:audience) ? audience : [] end |
#collections ⇒ Array
Alias articleHasCollection with fallback.
30 31 32 |
# File 'lib/parliament/grom/decorator/web_article.rb', line 30 def collections respond_to?(:articleHasCollection) ? articleHasCollection : [] end |
#publishers ⇒ Array
Alias publisher with fallback.
58 59 60 |
# File 'lib/parliament/grom/decorator/web_article.rb', line 58 def publishers respond_to?(:publisher) ? topic : [] end |
#related_articles ⇒ Array
Alias relatedArticle with fallback.
65 66 67 |
# File 'lib/parliament/grom/decorator/web_article.rb', line 65 def respond_to?(:relatedArticle) ? : [] end |
#topics ⇒ Array
Alias topic with fallback.
51 52 53 |
# File 'lib/parliament/grom/decorator/web_article.rb', line 51 def topics respond_to?(:topic) ? topic : [] end |
#types ⇒ Array
Alias articleType with fallback.
37 38 39 |
# File 'lib/parliament/grom/decorator/web_article.rb', line 37 def types respond_to?(:articleType) ? articleType : [] end |