vendor/bundle/ruby/1.8/gems/macaddr-1.5.0/lib/macaddr.rb
def parse(output)
      lines = output.split(/\n/)

      candidates = lines.select{|line| line =~ RE}
      raise 'no mac address candidates' unless candidates.first
      candidates.map!{|c| c[RE].strip}

      maddr = candidates.first
      raise 'no mac address found' unless maddr

      maddr.strip!
      maddr.instance_eval{ @list = candidates; def list() @list end }
      maddr
    end
##
# Accessor for the system's first MAC address, requires a call to #address
# first
Accessor for the system's first MAC address, requires a call to #address
first
Accessor for the system ' s first MAC address requires a call to #address first
def parse(output)
      lines = output.split(/\n/)
      candidates = lines.select{|line| line =~ RE}
      raise 'no mac address candidates' unless candidates.first
      candidates.map!{|c| c[RE].strip}
      maddr = candidates.first
      raise 'no mac address found' unless maddr
      maddr.strip!
      maddr.instance_eval{ @list = candidates; def list() @list end }
      maddr
    end
def parse ( output ) lines = output . split ( / \n / ) candidates = lines . select { | line | line =~ RE } raise 'no mac address candidates' unless candidates . first candidates . map! { | c | c [ RE ] . strip } maddr = candidates . first raise 'no mac address found' unless maddr maddr . strip! maddr . instance_eval { @list = candidates ; def list ( ) @list end } maddr end
Accessor for the system's first MAC address, requires a call to #address
first
Accessor for the system ' s first MAC address requires a call to #address first
output