Class: Amnesie::MAC
- Inherits:
-
Object
- Object
- Amnesie::MAC
- Defined in:
- lib/amnesie/mac.rb
Instance Method Summary collapse
- #down ⇒ Object
-
#initialize(card) ⇒ MAC
constructor
A new instance of MAC.
- #set_addr ⇒ Object
- #to_s ⇒ Object
- #up ⇒ Object
Constructor Details
Instance Method Details
#down ⇒ Object
16 17 18 |
# File 'lib/amnesie/mac.rb', line 16 def down @ip.run("link set dev #{@card} down") end |
#set_addr ⇒ Object
12 13 14 |
# File 'lib/amnesie/mac.rb', line 12 def set_addr @ip.run("link set dev #{@card} address #{@mac}") end |
#to_s ⇒ Object
24 25 26 |
# File 'lib/amnesie/mac.rb', line 24 def to_s @card + " " + @mac end |
#up ⇒ Object
20 21 22 |
# File 'lib/amnesie/mac.rb', line 20 def up @ip.run("link set dev #{@card} up") end |