2023-05-25 17:47:19 +02:00
|
|
|
# Lösung: Keyword-Parameter
|
2023-05-23 09:19:31 +02:00
|
|
|
|
2023-05-25 17:49:42 +02:00
|
|
|
|
|
|
|
```ruby
|
2023-05-25 17:47:19 +02:00
|
|
|
def greet(vorname:, nachname:)
|
|
|
|
puts "Hello #{vorname} #{nachname}"
|
2023-05-23 09:19:31 +02:00
|
|
|
end
|
|
|
|
|
2023-05-25 17:47:19 +02:00
|
|
|
greet(vorname: 'Barbara', nachname: 'Liskov')
|
|
|
|
greet(nachname: 'Liskov', vorname: 'Barbara')
|
2023-05-23 09:19:31 +02:00
|
|
|
```
|