Class: Arachni::Parser::Extractors::Base Abstract
- Defined in:
 - lib/arachni/parser/extractors/base.rb
 
Overview
  This class is abstract.
  
  Instance Attribute Summary collapse
- 
  
    
      #downcased_html  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute downcased_html.
 - 
  
    
      #html  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute html.
 - 
  
    
      #parser  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute parser.
 
Instance Method Summary collapse
- #check_for?(string_or_regexp) ⇒ Boolean
 - #document ⇒ Object
 - 
  
    
      #initialize(options = {})  ⇒ Base 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Base.
 - 
  
    
      #run  ⇒ Array<String> 
    
    
  
  
  
  
  
  abstract
  
  
  
    
This method must be implemented by all checks and must return an array of paths as plain strings.
 
Constructor Details
#initialize(options = {}) ⇒ Base
Returns a new instance of Base.
      21 22 23 24 25  | 
    
      # File 'lib/arachni/parser/extractors/base.rb', line 21 def initialize( = {} ) @html = [:html] @downcased_html = @html.downcase if @html @parser = [:parser] end  | 
  
Instance Attribute Details
#downcased_html ⇒ Object (readonly)
Returns the value of attribute downcased_html.
      19 20 21  | 
    
      # File 'lib/arachni/parser/extractors/base.rb', line 19 def downcased_html @downcased_html end  | 
  
#html ⇒ Object (readonly)
Returns the value of attribute html.
      17 18 19  | 
    
      # File 'lib/arachni/parser/extractors/base.rb', line 17 def html @html end  | 
  
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
      18 19 20  | 
    
      # File 'lib/arachni/parser/extractors/base.rb', line 18 def parser @parser end  | 
  
Instance Method Details
#check_for?(string_or_regexp) ⇒ Boolean
      35 36 37 38  | 
    
      # File 'lib/arachni/parser/extractors/base.rb', line 35 def check_for?( string_or_regexp ) return true if !@html !!@downcased_html[string_or_regexp] end  | 
  
#document ⇒ Object
      40 41 42  | 
    
      # File 'lib/arachni/parser/extractors/base.rb', line 40 def document parser.document end  |