dep
dep copied to clipboard
Removes redundant struct
This is a totally stupid PR but I'll send it because I was going to add going to add a feature to CLI.add
to allow multiple additions but then I regret it :P
Using class Something < Struct.new(:a)
generates a useless instance of which the class inherits. It can be called Something = Struct.new(:a)
class A < Struct.new(:a)
end
B = Struct.new(:b)
A.ancestors
# => [A, #<Class:0x007fbee3027908>, Struct, Enumerable, Object, Kernel, BasicObject]
B.ancestors
# => [B, Struct, Enumerable, Object, Kernel, BasicObject]
Again, this is probably stupid but I enjoy reading your code.
+1 :)
:+1: