Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8fb5fb9a85
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (19 sloc) 0.384 kb
require "erb"
class Device
def initialize(service, name, address)
@service = service
@name = name
@address = address
end
attr_reader :name
def fast_on
send_command("DFON")
end
def fast_off
send_command("DFOF")
end
private
def send_command(command)
@service.request("nodes/#{ERB::Util.u @address}/cmd/#{command}")
end
end
Jump to Line
Something went wrong with that request. Please try again.