Created
March 14, 2023 16:13
-
-
Save lynchmaniac/68fef30a19a65ead9e2bd4f7c02d5393 to your computer and use it in GitHub Desktop.
Exemple Asciidoc
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
# The Greeter class | |
class Greeter | |
def initialize(name) | |
@name = name.capitalize | |
end | |
def salute | |
puts "Hello #{@name}!" | |
end | |
end | |
# Create a new object | |
g = Greeter.new("world") | |
# Output "Hello World!" | |
g.salute |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment