It seems commonplace to name classes "Base" in Ruby. I'm not sure why, nor how I feel about it.
Consider, for example, ActiveRecord. ActiveRecord
is a module that contains a number of classes such as Observer
and Migration
, as well as a class called Base
. What's the benefit of this, as opposed to having an ActiveRecord
class that contains Observer
and Migration
?
class ActiveRecord
class Observer
[...]
end
class Migration
[...]
end
end
vs
module ActiveRecord
class Base
[...]
end
class Observer
[...]
end
class Migration
[...]
end
end