class Object
Public Instance Methods
is_numeric?(s)
click to toggle source
Make this script executable to make it it work! Also add a line to your .bashrc file for easy access: alias backlight=“sudo /DESTINATION_OF_RUBY_SCRIPT.rb”
# File backlight.rb, line 16 def is_numeric?(s) !!Float(s) rescue false end