lib/mihari/structs/onyphe.rb in mihari-5.4.2 vs lib/mihari/structs/onyphe.rb in mihari-5.4.3

- old
+ new

@@ -40,23 +40,23 @@ end # # @return [Mihari::Artifact] # - def to_artifact + def artifact Mihari::Artifact.new( data: ip, metadata: metadata, - autonomous_system: to_as, - geolocation: to_geolocation + autonomous_system: as, + geolocation: geolocation ) end # # @return [Mihari::Geolocation, nil] # - def to_geolocation + def geolocation return nil if country_code.nil? Mihari::Geolocation.new( country: NormalizeCountry(country_code, to: :short), country_code: country_code @@ -64,11 +64,11 @@ end # # @return [Mihari::AutonomousSystem] # - def to_as + def as Mihari::AutonomousSystem.new(asn: normalize_asn(asn)) end class << self # @@ -148,11 +148,11 @@ end # # @return [Array<Mihari::Artifact>] # - def to_artifacts - results.map(&:to_artifact) + def artifacts + results.map(&:artifact) end class << self # # @param [Hash] d