Skip to content

Instantly share code, notes, and snippets.

View bascht's full-sized avatar
📢
Setting all the statuses.

Sebastian Schulze bascht

📢
Setting all the statuses.
View GitHub Profile
class Enumerator
def extract(&blk)
self.each do |obj|
blk.call(*blk.parameters.map(&:last).map {|attr| obj.send(attr)})
end
end
end
Treasure = Struct.new(:coins, :gems)