Skip to content

Commit b58dfa2

Browse files
committed
Typographic spacing fixes
1 parent cbc5555 commit b58dfa2

15 files changed

+72
-72
lines changed

source/try_ruby_en.json

Lines changed: 14 additions & 14 deletions
Large diffs are not rendered by default.

translations/en/try_ruby_170.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ ok: Ok
77
error: Almost
88
---
99

10-
So we stored our lotto numbers inside variable ticket. How to get 'em out again ?
10+
So we stored our lotto numbers inside variable ticket. How to get 'em out again?
1111

1212
We already saw that we can get the highest number with __max__. Similarly you can
1313
get the __first__ or the __last__ element of the list.
14-
But what if you want a specific element ?
14+
But what if you want a specific element?
1515

1616
### [ ]
1717
Ruby uses the square brackets [ ] to target an element.
@@ -25,9 +25,9 @@ Let's get all of our lotto numbers:
2525
puts ticket[1]
2626
puts ticket[2]
2727

28-
Why do we use [0], [1], [2] ?
28+
Why do we use [0], [1], [2]?
2929

30-
And not [1], [2] and [3] ? Is that some kind of Japanese Zen thing ?
30+
And not [1], [2] and [3]? Is that some kind of Japanese Zen thing?
3131
No, we computer people just like to begin counting from zero. It's not just a Ruby thing,
3232
this _zero based indexing_ is used in most programming languages.
3333

translations/en/try_ruby_180.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ title: Summary #2 is Upon Us
44
answer: \w+
55
class: stretcher chapmark
66
load: poem = "My toast has flown from my hand\nAnd my toast has gone to the moon.\nBut when I saw it on television,\nPlanting our flag on Halley's comet,\nMore still did I want to eat it.\n"
7-
ok: Does it rhyme ?
8-
error:
7+
ok: Does it rhyme?
8+
error:
99
---
1010

1111
Now, look how your second minute went:

translations/en/try_ruby_230.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ title: Of All the Summaries, #3 is Here Now
44
answer: \{\}
55
class: stretcher chapmark
66
load: prev
7-
ok: You've made an empty hash !
8-
error:
7+
ok: You've made an empty hash!
8+
error:
99
---
1010

1111
### Exclamations
@@ -24,7 +24,7 @@ methods is <a href="http://ruby-doc.org/core/classes/String.html" target="_blank
2424

2525
Go ahead and try a few, such as: poem.downcase or poem.swapcase
2626

27-
## Ready ?
27+
## Ready?
2828
When you feel ready to move on, type:
2929

3030
books = {}

translations/en/try_ruby_320.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
---
22
lang: EN
33
title: To (be) or not to (be)
4-
answer:
4+
answer:
55
load: poem = "My toast has flown from my hand\nAnd my toast has gone to the moon.\nYada yada yada\n"
6-
ok:
7-
error:
6+
ok:
7+
error:
88
---
99

1010
One other little thing we haven't really talked about openly: method arguments.
11-
Remember when we changed the poem a little bit ? We used:
11+
Remember when we changed the poem a little bit? We used:
1212
__poem.gsub("toast", "honeydew")__
13-
13+
1414
The gsub method needs 2 arguments, which we passed to gsub by including two strings between
1515
parenthesis. _Arguments tell the method exactly what to do._
1616

1717
### Parenthesis
1818
Actually, most of the time Ruby doesn't mind if you omit the parenthesis. So this would have
19-
worked too:
19+
worked too:
2020
__poem.gsub "toast", "honeydew"__
2121

2222
We have already used another method with a parameter. Many times in fact, though it was not very
2323
obvious:
2424

2525
puts "Hello"
2626
puts("Hello")
27-
27+
2828
Yes __puts__ is also a method. Using puts with or without parenthesis is the same to Ruby, but the
29-
version without parenthesis is a bit easier to read. And it saves you valuable typing time !
29+
version without parenthesis is a bit easier to read. And it saves you valuable typing time!
3030

3131
> So I guess the conclusion is that you can do whatever you like with parenthesis as long as your
3232
> code reads nicely.
@@ -35,4 +35,4 @@ version without parenthesis is a bit easier to read. And it saves you valuable t
3535
So if _to_ is a method and _be_ is an argument we now know the answer to this age old question.
3636
It is really just a matter of preference whether you want _to be_ or _to(be)_.
3737

38-
Are you in the mood for more Shakespeare ? Read on.
38+
Are you in the mood for more Shakespeare? Read on.

translations/en/try_ruby_330.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
lang: EN
33
title: The Taming of the Shrew
44
answer: ^tame
5-
ok: Good good !
6-
error:
5+
ok: Good good!
6+
error:
77
---
88

99
You totally know how to use Ruby now. I mean you've got down the essentials.
@@ -27,7 +27,7 @@ read and understand that code later.
2727
Instead you should cut up your code in different methods and give each method an easy to
2828
understand English name. You will thank yourself later.
2929

30-
So how do we define a method ? Like this:
30+
So how do we define a method? Like this:
3131

3232
def tame( number_of_shrews )
3333
end

translations/en/try_ruby_360.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ lang: EN
33
title: Give and take
44
answer: \d+
55
ok: Right on. Bravo.
6-
error:
6+
error:
77
---
88

99
Most methods do not only want some parameters as input, but will also __give something back__.
@@ -15,7 +15,7 @@ I have changed our method a bit so it will return a value to you. Try it:
1515
}
1616
return number_of_shrews
1717
end
18-
18+
1919
puts tame(3)
2020

2121
### Return
@@ -26,4 +26,4 @@ Ruby will automagically return the last value that was used inside the method.
2626
So we can change the last line to just: __number\_of\_shrews__.
2727

2828
But since method __.times__ also returns the _number\_of\_shrews_ we can
29-
remove the entire last line. So in fact our original method already did what we wanted all along !
29+
remove the entire last line. So in fact our original method already did what we wanted all along!

translations/en/try_ruby_370.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
lang: EN
33
title: Hello, Who's There? And Summary #5 Waves Its Hat!
4-
answer:
4+
answer:
55
class: stretcher chapmark
6-
ok:
7-
error:
6+
ok:
7+
error:
88
---
99

1010
Well done, well done, well done, well done!
@@ -24,4 +24,4 @@ Methods can have parameters.
2424
Methods (almost) always return a value.
2525

2626
## Now
27-
To (be) or not to (be) is not a question to you anymore. Are you ready for some more Shakespeare ?
27+
To (be) or not to (be) is not a question to you anymore. Are you ready for some more Shakespeare?

translations/en/try_ruby_40.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ lang: EN
33
title: Putting it differently
44
answer: ^[0-9\.,-]{1,}$
55
ok: Well put
6-
error:
6+
error:
77
---
88

99
Did you notice that if you typed more than one formula you only saw the answer for the last one.
10-
What is going on ?
10+
What is going on?
1111

1212
> To make this website easier to use I have told Ruby to copy the result of your program to the
1313
> output screen at the top. So when you type a formula you get to see the results.
1414
> __But only the last result.__ And only if the output is still empty.
1515
1616
So when you entered 2 or more formula's, Ruby only showed the result of the last formula.
1717

18-
Of course you have the power to control the screen ! Just type __puts__ before each formula
18+
Of course you have the power to control the screen! Just type __puts__ before each formula
1919
(with a space in between). Puts means: *'put something on the screen'*.
2020

2121
Try this:

translations/en/try_ruby_410.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ length of 30 characters so the years align nicely.
3737

3838
See if you can change the ouput of the program so that it shows the plays like this: __1600 -> As You Like It__
3939

40-
__All's Well That Ends Well ?__ Hey we're not done yet, but the end is in sight !
40+
__All's Well That Ends Well?__ Hey we're not done yet, but the end is in sight!

0 commit comments

Comments
 (0)