Class: SearchMacAddress::Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/search_mac_address.rb

Class Method Summary collapse

Class Method Details

.all_addrObject



12
13
14
# File 'lib/search_mac_address.rb', line 12

def all_addr
  all_ip_addr
end

.all_ip_addrObject



8
9
10
# File 'lib/search_mac_address.rb', line 8

def all_ip_addr
  SearchMacAddress::AddrMac.get_ip_addresses
end

.decode(addr) ⇒ Object



29
30
31
# File 'lib/search_mac_address.rb', line 29

def decode(addr)
  addr ? Base64.urlsafe_decode64(addr) : ''
end

.encodeObject



24
25
26
27
# File 'lib/search_mac_address.rb', line 24

def encode
  rec = ip_addr
  rec ? Base64.urlsafe_encode64(rec) : ''
end

.ip_addrObject



16
17
18
# File 'lib/search_mac_address.rb', line 16

def ip_addr
  all_ip_addr.first
end

.mac_addrObject



20
21
22
# File 'lib/search_mac_address.rb', line 20

def mac_addr
  ip_addr
end