Skip to content

Commit

Permalink
README-MiniScript: cabrio is a german word, lets use the english one
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasdr committed Oct 25, 2023
1 parent f6277d3 commit ebc6a2c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README-MiniScript.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,14 +633,14 @@ If you want to assign a class member function later, see this example.

```
...
function: setCabrio(=$this, $cabrio)
$this.cabrio = $cabrio
function: setConvertible(=$this, $convertible)
$this.convertible = $convertible
end
function: showMeWhatYouGot($this)
$carType = "car"
if ($this.cabrio == true)
$carType = "cabrio"
if ($this.convertible == true)
$carType = "convertible"
end
console.log(
"This amazing ",
Expand All @@ -656,11 +656,13 @@ function: showMeWhatYouGot($this)
end
...
#
$car.cabrio = false
$car.setCabrio = () -> setCabrio
$car.convertible = false
$car.setConvertible = () -> setConvertible
$car.showMeWhatYouGot = () -> showMeWhatYouGot
#
console.dump($car)
# I want a convertible, who doesn't?
$car->setConvertible(true)
# arrr, lets see what kind of car we got
$car->showMeWhatYouGot()
#...
Expand Down

0 comments on commit ebc6a2c

Please sign in to comment.