whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [1/1] Commit 508c32a: vacate Podling class of all instance methods
Date Tue, 08 Mar 2016 20:00:34 GMT
Commit 508c32a1d57393d1ddc7a4ba28065355f2022c95:
    vacate Podling class of all instance methods


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
lib/whimsy/asf/podlings.rb                                   | +++ --------
------------------------------------------------------------
11 changes: 3 additions, 8 deletions.
------------------------------------------------------------


diff --git a/lib/whimsy/asf/podlings.rb b/lib/whimsy/asf/podlings.rb
index 122ac9a..8186836 100644
--- a/lib/whimsy/asf/podlings.rb
+++ b/lib/whimsy/asf/podlings.rb
@@ -5,7 +5,7 @@ module ASF
   class Podlings
     include Enumerable
 
-    def quarter
+    def self.quarter
       [
         Date.today.strftime('%B'),
         Date.today.next_month.strftime('%B'),
@@ -13,7 +13,7 @@ def quarter
       ]
     end
 
-    def each
+    def self.each
       incubator_content = ASF::SVN['asf/incubator/public/trunk/content']
       podlings = Nokogiri::XML(File.read("#{incubator_content}/podlings.xml"))
       podlings.search('podling').map do |node|
@@ -45,14 +45,9 @@ def each
       end
     end
 
-    # convenience method for iterating over the entire list
-    def self.to_enum
-      self.new.to_enum    
-    end
-
     # return the entire list as a hash
     def self.to_h
-      Hash[self.new.to_a]
+      Hash[self.to_a]
     end
   end
 end

Mime
View raw message