src/examples/switch_monitor/switch-monitor.rb in trema-0.4.6 vs src/examples/switch_monitor/switch-monitor.rb in trema-0.4.7
- old
+ new
@@ -26,26 +26,26 @@
def start
@switches = []
end
- def switch_ready datapath_id
+ def switch_ready(datapath_id)
@switches << datapath_id.to_hex
info "Switch #{ datapath_id.to_hex } is UP"
end
- def switch_disconnected datapath_id
- @switches -= [ datapath_id.to_hex ]
+ def switch_disconnected(datapath_id)
+ @switches -= [datapath_id.to_hex]
info "Switch #{ datapath_id.to_hex } is DOWN"
end
private
def show_switches
- info "All switches = " + @switches.sort.join( ", " )
+ info 'All switches = ' + @switches.sort.join(', ')
end
end
### Local variables: