Created
December 14, 2012 04:23
-
-
Save anonymous/4282683 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby Class_Case_Study_2.rb | |
Class_Case_Study_2.rb:24:in `initialize': wrong number of arguments(3 for 0) (ArgumentError) | |
from Class_Case_Study_2.rb:24:in `new' | |
from Class_Case_Study_2.rb:24:in `<main>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
class TestRuby | |
##GLOBAL VARIABLES (Use @@) | |
def initialized(varA, varB, varC) | |
@data1=varA | |
@data2=varB | |
@data3=varC | |
end | |
def displayData() | |
puts "Variable A is: #@varA" | |
puts "Variable B is: #@varB" | |
puts "Variable C is: #@varC" | |
end | |
end | |
## CreateOBJECTS | |
methOne=TestRuby.new("56", "toto", "fart is the math") | |
## Call Objects | |
methOne.displayData() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment