Class: KismetToKml::Converter

Inherits:
Object
  • Object
show all
Defined in:
lib/kismet_to_kml/converter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gpsxml_file, netxml_file, output_file) ⇒ Converter



11
12
13
14
15
16
# File 'lib/kismet_to_kml/converter.rb', line 11

def initialize(gpsxml_file, netxml_file, output_file)
  @kml_file = output_file
  @gpsxml = Nokogiri::XML(File.read(gpsxml_file))
  @netxml = Nokogiri::XML(File.read(netxml_file))
  @wifi_networks = {}
end

Instance Attribute Details

#gpsxmlObject

Returns the value of attribute gpsxml.



9
10
11
# File 'lib/kismet_to_kml/converter.rb', line 9

def gpsxml
  @gpsxml
end

#kml_fileObject

Returns the value of attribute kml_file.



9
10
11
# File 'lib/kismet_to_kml/converter.rb', line 9

def kml_file
  @kml_file
end

#netxmlObject

Returns the value of attribute netxml.



9
10
11
# File 'lib/kismet_to_kml/converter.rb', line 9

def netxml
  @netxml
end

#wifi_networksObject

Returns the value of attribute wifi_networks.



9
10
11
# File 'lib/kismet_to_kml/converter.rb', line 9

def wifi_networks
  @wifi_networks
end

Instance Method Details

#convert!Object



18
19
20
21
22
# File 'lib/kismet_to_kml/converter.rb', line 18

def convert!
  extract_networks
  extract_points
  generate_kml
end