class Wifimap::Mac
Public Class Methods
manufacturer(mac)
click to toggle source
Get the manufacturer for the given mac address.
@param [String] mac @return [String]
# File lib/wifimap/mac.rb, line 19 def self.manufacturer(mac) Louis.lookup(mac)['long_vendor'] end
valid?(mac)
click to toggle source
Return true if the mac format is correct, false otherwise.
@param [String] mac @return [Boolean]
# File lib/wifimap/mac.rb, line 11 def self.valid?(mac) mac =~ /([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})/ ? true : false end