mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 15:24:09 +03:00
[ruby/de] typo, formatting and translation fixes (#1792)
* [ruby-ecosystem/de] typo fixes * move name to translators section * remove trailing whitespace * revamp sentence
This commit is contained in:
parent
78617f6c8c
commit
819d16b7e5
@ -13,6 +13,7 @@ contributors:
|
|||||||
- ["Rahil Momin", "https://github.com/iamrahil"]
|
- ["Rahil Momin", "https://github.com/iamrahil"]
|
||||||
translators:
|
translators:
|
||||||
- ["Christian Albrecht", "https://github.com/coastalchief"]
|
- ["Christian Albrecht", "https://github.com/coastalchief"]
|
||||||
|
- ["Dennis Keller", "https://github.com/denniskeller"]
|
||||||
filename: ruby-de.rb
|
filename: ruby-de.rb
|
||||||
lang: de-de
|
lang: de-de
|
||||||
---
|
---
|
||||||
@ -195,7 +196,7 @@ array[12] #=> nil
|
|||||||
array[-1] #=> 5
|
array[-1] #=> 5
|
||||||
```
|
```
|
||||||
|
|
||||||
## Arrays können mit Stard Index und Länge indiziert werden
|
## Arrays können mit Start Index und Länge indiziert werden
|
||||||
```
|
```
|
||||||
array[2, 3] #=> [3, 4, 5]
|
array[2, 3] #=> [3, 4, 5]
|
||||||
```
|
```
|
||||||
@ -219,8 +220,6 @@ array.include?(1) #=> true
|
|||||||
# Hashes
|
# Hashes
|
||||||
Hashes sind das Hauptfeature um Key/Values zu speichern
|
Hashes sind das Hauptfeature um Key/Values zu speichern
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
## Ein Hash anlegen
|
## Ein Hash anlegen
|
||||||
```
|
```
|
||||||
hash = { 'color' => 'green', 'number' => 5 }
|
hash = { 'color' => 'green', 'number' => 5 }
|
||||||
@ -232,7 +231,7 @@ hash.keys #=> ['color', 'number']
|
|||||||
hash['color'] #=> 'green'
|
hash['color'] #=> 'green'
|
||||||
hash['number'] #=> 5
|
hash['number'] #=> 5
|
||||||
hash['nothing here'] #=> nil
|
hash['nothing here'] #=> nil
|
||||||
// Asking a hash for a key that doesn't exist returns nil:
|
// Fragen an einen Hash nach einem Schlüssel, der nicht existiert, ruft nil hervor:
|
||||||
```
|
```
|
||||||
|
|
||||||
## Symbols können auch keys sein
|
## Symbols können auch keys sein
|
||||||
@ -247,7 +246,7 @@ new_hash.has_key?(:defcon) #=> true
|
|||||||
new_hash.has_value?(3) #=> true
|
new_hash.has_value?(3) #=> true
|
||||||
```
|
```
|
||||||
|
|
||||||
### Tip: Arrays und Hashes sind Enumerable
|
### Tipp: Arrays und Hashes sind Enumerable
|
||||||
### Und haben gemeinsame, hilfreiche Methoden wie:
|
### Und haben gemeinsame, hilfreiche Methoden wie:
|
||||||
### each, map, count, and more
|
### each, map, count, and more
|
||||||
|
|
||||||
@ -339,7 +338,7 @@ end
|
|||||||
=> "OK job"
|
=> "OK job"
|
||||||
```
|
```
|
||||||
|
|
||||||
# exception handling:
|
# Exception handling:
|
||||||
```
|
```
|
||||||
begin
|
begin
|
||||||
# code here that might raise an exception
|
# code here that might raise an exception
|
||||||
@ -366,7 +365,7 @@ end
|
|||||||
double(2) #=> 4
|
double(2) #=> 4
|
||||||
```
|
```
|
||||||
|
|
||||||
### Klammern sind optional wenn das Ergebnis nicht mehdeutig ist
|
### Klammern sind optional wenn das Ergebnis nicht mehrdeutig ist
|
||||||
```
|
```
|
||||||
double 3 #=> 6
|
double 3 #=> 6
|
||||||
double double 3 #=> 12
|
double double 3 #=> 12
|
||||||
|
Loading…
Reference in New Issue
Block a user