Module: Amass::Parsers::JSON
- Defined in:
- lib/amass/parsers/json.rb
Overview
Parses single-line JSON hashes.
Class Method Summary collapse
-
.parse(io) {|hostname| ... } ⇒ Enumerator
Parses a single-line of JSON.
Class Method Details
.parse(io) {|hostname| ... } ⇒ Enumerator
Parses a single-line of JSON.
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/amass/parsers/json.rb', line 29 def self.parse(io) return enum_for(__method__,io) unless block_given? io.each_line do |line| line.chomp! json = ::JSON.parse(line) yield map_hostname(json) end end |