diff --git a/README.md b/README.md index b608cca..d91d057 100644 --- a/README.md +++ b/README.md @@ -53,17 +53,17 @@ times. The entire program would look something like this: ```ruby phrase = "Hello World!" -puts phrase -puts phrase -puts phrase -puts phrase -puts phrase -puts phrase -puts phrase -puts phrase -puts phrase -puts phrase - + puts phrase + puts phrase + puts phrase + puts phrase + puts phrase + puts phrase + puts phrase + puts phrase + puts phrase + puts phrase +end # ... The rest of the program puts phrase @@ -291,7 +291,7 @@ Let's end by talking briefly about one additional use of `#`. Programmers love conventions, or agreed upon rules that help them talk to each other about code. A common syntax convention for Ruby methods is to preface them with a `#`, and in subsequent lessons, you might see method names written with a `#` in front of -them. For example, if a method is named 'greeting', rubyists will often refer to -it as `#greeting`. This is so that other rubyists can instantly recognize it as -a method, as opposed to a variable or a bareword or a class. But remember that +them. For example, if a method is named 'greeting', rubyists will often refer to +it as `#greeting`. This is so that other rubyists can instantly recognize it as +a method, as opposed to a variable or a bareword or a class. But remember that when you write it in your code, it should be `greeting` and not `#greeting`. diff --git a/greeting.rb b/greeting.rb new file mode 100644 index 0000000..ab681ff --- /dev/null +++ b/greeting.rb @@ -0,0 +1,5 @@ +def greeting + puts "Hello World" +end + +greeting \ No newline at end of file diff --git a/lib/example.rb b/lib/example.rb index de7d2cb..f57b6a3 100644 --- a/lib/example.rb +++ b/lib/example.rb @@ -1,13 +1,14 @@ # Use this space to code along with the readme - -phrase = "Hello World!" -puts phrase -puts phrase -puts phrase -puts phrase -puts phrase -puts phrase -puts phrase -puts phrase -puts phrase -puts phrase \ No newline at end of file +def say_hello_world_ten_times + phrase = "Hello World!" + puts phrase + puts phrase + puts phrase + puts phrase + puts phrase + puts phrase + puts phrase + puts phrase + puts phrase + puts phrase +end diff --git a/touch b/touch new file mode 100644 index 0000000..e69de29