Module: Decidim::Core::AuthorableInterface

Includes:
Api::Types::BaseInterface
Defined in:
lib/decidim/api/interfaces/authorable_interface.rb

Overview

This interface represents a commentable object.

Instance Method Summary collapse

Instance Method Details

#authorObject



14
15
16
17
18
19
20
# File 'lib/decidim/api/interfaces/authorable_interface.rb', line 14

def author
  if object.respond_to?(:normalized_author)
    object&.normalized_author
  elsif object.respond_to?(:creator_identity)
    object&.creator_identity
  end
end