You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sam Ruby <ru...@apache.org> on 2016/03/08 21:00:34 UTC
[whimsy.git] [1/1] Commit 508c32a: vacate Podling class of all instance methods
Commit 508c32a1d57393d1ddc7a4ba28065355f2022c95:
vacate Podling class of all instance methods
Branch: refs/heads/master
Author: Sam Ruby <ru...@intertwingly.net>
Committer: Sam Ruby <ru...@intertwingly.net>
Pusher: rubys <ru...@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