/ Published in: Ruby
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Infinity = 1.0/0 # a rather useless range everything = -Infinity..Infinity puts everything.includes?(5) #-> true # use it for representing an unbounded value storage_limits => { :demo => 0, :standard => 250.megabytes, :expert => 1.gigabyte, :unlimited => Infinity } if bytes_used < storage_limits[account_level] # add another file or something else # display "out of space" message end