It's a familiar syntax, but it's unfamiliar in this location, that's all. The base class specifier is allowed to be an expression, which can include method calls.
Here's a way of re-creating that situation:
class CrazyProxyClass
def [](v)
Class.new
end
end
CrazyMethod = CrazyProxyClass.new
class CrazyDerived < CrazyMethod[1.2]
end
CrazyDerived.new
# => CrazyDerived
You can also get even more adventurous:
class NormalBase
end
class DebugBase < NormalBase
end
class Example < (ENV['DEBUG'] ? DebugBase : NormalBase)
end
The only limit is your imagination and tools like Rubocop that will tell you it's probably a bad idea to get this nuts. The only real obligation is that whatever that expression returns is a Class or you'll get a "superclass must be a Class" exception.