Sha256: 60e340f2e82da2576f649e16135f89e159a426347e8c6aa70d84114d830fd9dd

Contents?: true

Size: 288 Bytes

Versions: 4

Compression:

Stored size: 288 Bytes

Contents

# This example was taken from http://alvinalexander.com/blog/post/ruby/examples-ruby-ternary-operator-true-false-syntax

# set the speed
speed = 90

# somewhere later in the program ...
speed > 55 ? (speed < 70 ? puts("Fine is $400") : puts("Fine is $800")) : puts("I'm a careful driver")

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nilac-0.0.4.3.9.8 shark/test_files/ternary.nila
nilac-0.0.4.3.9.7.1 shark/test_files/ternary.nila
nilac-0.0.4.3.9.7 shark/test_files/ternary.nila
nilac-0.0.4.3.9.6 shark/test_files/ternary.nila