lib/rubyipmi/freeipmi/commands/lan.rb in rubyipmi-0.10.0 vs lib/rubyipmi/freeipmi/commands/lan.rb in rubyipmi-0.11.0
- old
+ new
@@ -1,9 +1,7 @@
module Rubyipmi::Freeipmi
-
class Lan
-
attr_accessor :info
attr_accessor :channel
attr_accessor :config
def initialize(opts)
@@ -20,15 +18,15 @@
end
@info
end
def dhcp?
- info.fetch("ip_address_source",nil).match(/dhcp/i) != nil
+ info.fetch("ip_address_source", nil).match(/dhcp/i) != nil
end
def static?
- info.fetch("ip_address_source",nil).match(/static/i) != nil
+ info.fetch("ip_address_source", nil).match(/static/i) != nil
end
def ip
info.fetch("ip_address", nil)
end
@@ -85,11 +83,11 @@
# def vlanid=(vlan)
#
# end
def parse(landata)
- if ! landata.nil? and ! landata.empty?
+ if !landata.nil? && !landata.empty?
landata.lines.each do |line|
# clean up the data from spaces
next if line.match(/#+/)
next if line.match(/Section/i)
line.gsub!(/\t/, '')
@@ -100,6 +98,6 @@
end
end
@info
end
end
-end
\ No newline at end of file
+end