9c0fe1b8dc
including moving some files into the app folder instead of where it was perviously
18 lines
296 B
Ruby
18 lines
296 B
Ruby
# Handy null coalesing operator, taken from
|
|
# https://github.com/kibiz0r/coalesce/blob/bc4389ae8a8bb456cd10ec8a3523df1fc775124f/lib/coalesce.rb
|
|
|
|
class Object
|
|
def _?(x = nil)
|
|
self
|
|
end
|
|
end
|
|
|
|
class NilClass
|
|
def _?(x = nil)
|
|
if block_given?
|
|
yield
|
|
else
|
|
x
|
|
end
|
|
end
|
|
end
|