Created
August 4, 2009 04:59
-
-
Save imownbey/161033 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
class StringHolder | |
def initialize(a_string) | |
@the_string = a_string | |
end | |
def get_that_string | |
puts @the_string | |
end | |
def self.stupid_method(a_string) | |
puts "this method doesnt do anything" | |
end | |
end | |
#> string_holder_variable = StringHolder.new("this is my string!") | |
#> string_holder_variable.get_that_string ###===> This will print out "this is my string!" | |
#> another_string = StringHolder.new("this is another trhing!") | |
#> another_string.get_that_string ###===> This will print out "this is another trhing!" | |
#> StringHolder.stupid_method("this argument doesnt matter") ###===> This will print out "this method eoesnt do anything" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment