Class: SearchMacAddress::Filter
- Inherits:
-
Object
- Object
- SearchMacAddress::Filter
- Defined in:
- lib/search_mac_address.rb
Class Method Summary collapse
- .all_addr ⇒ Object
- .all_ip_addr ⇒ Object
- .decode(addr) ⇒ Object
- .encode ⇒ Object
- .ip_addr ⇒ Object
- .mac_addr ⇒ Object
Class Method Details
.all_addr ⇒ Object
12 13 14 |
# File 'lib/search_mac_address.rb', line 12 def all_addr all_ip_addr end |
.all_ip_addr ⇒ Object
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 |
.encode ⇒ Object
24 25 26 27 |
# File 'lib/search_mac_address.rb', line 24 def encode rec = ip_addr rec ? Base64.urlsafe_encode64(rec) : '' end |
.ip_addr ⇒ Object
16 17 18 |
# File 'lib/search_mac_address.rb', line 16 def ip_addr all_ip_addr.first end |
.mac_addr ⇒ Object
20 21 22 |
# File 'lib/search_mac_address.rb', line 20 def mac_addr ip_addr end |