建立一個類

你可以使用 class 關鍵字定義新類。

class MyClass
end

定義後,你可以使用 .new 方法建立新例項

somevar = MyClass.new
# => #<MyClass:0x007fe2b8aa4a18>