diff options
Diffstat (limited to 'lib/rubygems/specification.rb')
-rw-r--r-- | lib/rubygems/specification.rb | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index e98f3284cd..f4e609a5eb 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -241,6 +241,28 @@ class Gem::Specification < Gem::BasicSpecification attr_reader :summary ## + # Singular writer for #authors + # + # Usage: + # + # spec.author = 'John Jones' + + def author= o + self.authors = [o] + end + + ## + # Sets the list of authors, ensuring it is an array. + # + # Usage: + # + # spec.authors = ['John Jones', 'Mary Smith'] + + def authors= value + @authors = Array(value).flatten.grep(String) + end + + ## # The platform this gem runs on. # # This is usually Gem::Platform::RUBY or Gem::Platform::CURRENT. @@ -443,28 +465,6 @@ class Gem::Specification < Gem::BasicSpecification end ## - # Singular writer for #authors - # - # Usage: - # - # spec.author = 'John Jones' - - def author= o - self.authors = [o] - end - - ## - # Sets the list of authors, ensuring it is an array. - # - # Usage: - # - # spec.authors = ['John Jones', 'Mary Smith'] - - def authors= value - @authors = Array(value).flatten.grep(String) - end - - ## # Executables included in the gem. # # For example, the rake gem has rake as an executable. You don’t specify the |