Reputation: 171399
Is there a shorter way to do the following?
class MyClass
include MyModule1
include MyModule2
include MyModule3
end
Upvotes: 25
Views: 8496
Reputation: 7288
Try following
class MyClass
include MyModule3, MyModule2, MyModule1
end
Edit: reversed the sequence
Upvotes: 34
Reputation: 1952
to get the same ancestry order you need to reverse the order in the one line version
class MyClass
include MyModule3, MyModule2, MyModule1
end
Upvotes: 30