Skip to content
This repository was archived by the owner on Oct 22, 2020. It is now read-only.

Commit 01ec56b

Browse files
committed
Add Utility::Text.rand_month
1 parent 1687caf commit 01ec56b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/wpxf/utility/text.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ def self.md5(value)
5757
def self.rand_email
5858
"#{rand_alpha(rand(5..10))}@#{rand_alpha(rand(5..10))}.com"
5959
end
60+
61+
# Generate a random month name.
62+
# @return [String] the month name.
63+
def self.rand_month
64+
%w(january february march april june july august september october november december).sample
65+
end
6066
end
6167
end
6268
end

0 commit comments

Comments
 (0)