-
Notifications
You must be signed in to change notification settings - Fork 2
/
cat_integration.rb
49 lines (31 loc) · 897 Bytes
/
cat_integration.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
class CatIntegration
# this is my toolbox so the class is the box the definitions are the tools
# within it i created a class by doing file>new file>class template
# ctrl alt L auto reformats my code
def cats()
print "cats"
end
def compare ()
print "compare"
end
def list ()
print "list"
end
end
a = CatIntegration.new
a.cats()
# this is a memory code that tells us where a is stored
# a.list is the method in the class just prints list a dot anything of the methods
# would call that section of the code
print a
b = 1
print b
print 1
# a=catintegration in this case is the definition
# using modules requires instances
# class methods use a singleton, instance modules create copies
# instead of being shared its personal resource
# CatIntegration.list()
# if i hit ctrl slash that will turn this into a comment and make it not do shit
#
print a