class Rubyist
Constants
- VERSION
Attributes
name[R]
Public Class Methods
new(name)
click to toggle source
# File lib/rubyist.rb, line 9 def initialize name @name = name end
Also aliased as: named
own(gem_name)
click to toggle source
# File lib/rubyist.rb, line 30 def own gem_name Gems.owners(gem_name). map { |o| new o['handle'] } end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/rubyist.rb, line 13 def <=>(other) name <=> other.name end
gems()
click to toggle source
# File lib/rubyist.rb, line 17 def gems return @gems if defined? @gems result = Gems.gems(name) @gems = (Hash === result ? [] : result.map { |g| Gem.new g }) end
total_downloads()
click to toggle source
# File lib/rubyist.rb, line 23 def total_downloads gems.inject(0) { |sum, g| sum + g.total_downloads } end