Module: Ronin::Model::HasAuthors::InstanceMethods

Defined in:
lib/ronin/model/has_authors.rb

Overview

Instance methods that are added when Ronin::Model::HasAuthors is included into a model.

Instance Method Summary collapse

Instance Method Details

#author(attributes) ⇒ Object

Adds a new author to the resource.

Examples:

author :name => 'Anonymous',
       :email => '[email protected]',
       :organization => 'Anonymous LLC'

Parameters:

  • attributes (Hash)

    Additional attributes to create the new author.



105
106
107
# File 'lib/ronin/model/has_authors.rb', line 105

def author(attributes)
  self.authors.new(attributes)
end