Module: Wifimap::Parsable

Included in:
Wifimap::Parser::Airodump, Wifimap::Parser::SniffProbes
Defined in:
lib/wifimap/parsable.rb

Overview

The parsable module contains some helper methods and must-implement directives for parser classes.

Instance Method Summary collapse

Instance Method Details

#access_pointsObject

To be implemented in the class.

Raises:

  • (::NotImplementedError)


29
30
31
# File 'lib/wifimap/parsable.rb', line 29

def access_points
  raise ::NotImplementedError
end

#dumpString

Get the dump property for further processing.

Returns:

  • (String)


10
11
12
13
14
# File 'lib/wifimap/parsable.rb', line 10

def dump
  raise 'Error: the dump is empty' if @dump.nil?

  @dump
end

#dump_rowsArray

Split the dump by newline to get an array of all rows.

Returns:

  • (Array)


19
20
21
# File 'lib/wifimap/parsable.rb', line 19

def dump_rows
  dump.split("\n")
end

#stationsObject

To be implemented in the class.

Raises:

  • (::NotImplementedError)


24
25
26
# File 'lib/wifimap/parsable.rb', line 24

def stations
  raise ::NotImplementedError
end