Sha256: a2791c2db465806f5d5e8e0dc16cfffde3b2c97b0b3ebdecd03439babdf8f906

Contents?: true

Size: 548 Bytes

Versions: 4

Compression:

Stored size: 548 Bytes

Contents

module Sniffles
  module Sniffers
    class Posterous
      include HTML
      
      attr_accessor :doc
      attr_reader :output
      
      def initialize(response_body)
        @output = {}        
        parse(response_body) && process_document
      end
      
      def process_document
        @output[:found] = found?
      end
      
      private
      def found?
        meta_generator_content == "Posterous"
      end

      def meta_generator_content
        text_at("//meta[@name='generator']/@content")
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sniffles-0.1.5 lib/sniffles/sniffers/cms/posterous.rb
sniffles-0.1.4 lib/sniffles/sniffers/cms/posterous.rb
sniffles-0.1.3 lib/sniffles/sniffers/cms/posterous.rb
sniffles-0.1.2 lib/sniffles/sniffers/cms/posterous.rb