module Openplacos::Digital::Order::Switch

Public Instance Methods

set(arg_) click to toggle source
# File lib/openplacos/widget/Digital.rb, line 33
def set(arg_)
  if (arg_ == "True" || (arg_ == "true") || (arg_ == "on")|| (arg_ == "ON"))
    return write(true, {})
  end
  if (arg_ == "False" || (arg_ == "false")|| (arg_ == "off")|| (arg_ == "OFF"))
    return write(false, {})
  end
  puts "Action not recognized, please use ON/OFF"
end