Sha256: 330a4eadef255b2d0b4b8006d420af4524823725d0e99410ea79eebd7ca1a56f
Contents?: true
Size: 762 Bytes
Versions: 1
Compression:
Stored size: 762 Bytes
Contents
module Codesake module Gengiscan class General attr_reader :general_result def initialize(options={}) @cookies = options[:cookies] @page = options[:page] @url = options[:url] @general_result = {} end def detect @general_result = {:code=>@page.code, :server=>@page.header['server'], :powered=>@page.header['X-Powered-By'], :generator=>get_generator_signature(@page.body)} end private def get_generator_signature(body) generator = "" doc=Nokogiri::HTML(body) doc.xpath("//meta[@name='generator']/@content").each do |value| generator = value.value end generator end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
codesake-gengiscan-0.0.1 | lib/codesake/gengiscan/general.rb |