Posts by Enrique Leão izel • 45 points
3 posts
-
0
votes1
answer184
viewsQ: How to Import Classes from Another Package
How do I import a class that is in another package Example: package "model" contains the class "Car", package "execution" contains the class "Main", from within the "Main" I want to import the class…
-
2
votes1
answer157
viewsQ: Measure time of a routine in Ruby
Is there a Ruby function to measure the time of a function? In python I use: ini = time.time() #função fim = time.time()
-
1
votes2
answers187
viewsQ: Ruby syntax
What happens in this part here? def permut(vet) return [vet] if vet.size < 2 perm = [] vet.each{ |e| permut(vet - [e]).each{|p| perm << ([e] + p) } } perm end The first lines I understand,…