Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,26 @@
class MyClass {
read_slot: 'instance_var # creates getter method for @instance_var
@@class_var = []
def initialize {
# 'initialize' is the constructor method invoked during 'MyClass.new' by convention
@instance_var = 0
}
def some_method {
@instance_var = 1
@another_instance_var = "foo"
}
# define class methods: define a singleton method on the class object
def self class_method {
# ...
}
# you can also name the class object itself
def MyClass class_method {
# ...
}
}
myclass = MyClass new