Sha256: d38f1ec20887318dfd27c59bf33710a95cf24daaf6debfd0ca1574c5fcd79457
Contents?: true
Size: 678 Bytes
Versions: 2
Compression:
Stored size: 678 Bytes
Contents
module Parliament module Grom module Decorator # Decorator namespace for Grom::Node instances with type: https://id.parliament.uk/schema/AnsweringBody. module AnsweringBody # Alias groupName with fallback. # # @return [String, STring] the name of the Grom::Node or an empty string. def name respond_to?(:groupName) ? groupName : '' end # Alias answeringBodyHasAnswer with fallback. # # @return [Grom::Node, []] the answer of the Grom::Node or nil. def answers respond_to?(:answeringBodyHasAnswer) ? answeringBodyHasAnswer : [] end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
parliament-grom-decorators-0.27.6 | lib/parliament/grom/decorator/answering_body.rb |
parliament-grom-decorators-0.27.5 | lib/parliament/grom/decorator/answering_body.rb |