Creating a class
suggest changeYou can define a new class using the class keyword.
class MyClass
end
Once defined, you can create a new instance using the .new method
somevar = MyClass.new
# => #<MyClass:0x007fe2b8aa4a18>
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents