crazy like enumeration
class Maze
attr_reader :enoooooom
def initialize
@enoooooom = Enumerator.new do |y|
name = "barg"
loop do
name += namer
y.yield name
end
end
end
def namer
%w[arse flaps mental baggage rinse hopeman grinder pop].sample
end
end
Written by Dave Goodchild
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Related Tags
#ruby
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#