Class: BoaVista::Response::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/boa_vista/response/parser.rb

Constant Summary collapse

INVALID_STRING =
"<PRE>"
BLANK_SPACE =
''

Instance Method Summary collapse

Constructor Details

#initialize(response, base_tag = '//pre') ⇒ Parser

Returns a new instance of Parser.



9
10
11
12
# File 'lib/boa_vista/response/parser.rb', line 9

def initialize(response, base_tag = '//pre')
  @base_tag = '//pre'
  @response = response
end

Instance Method Details

#callObject



14
15
16
17
# File 'lib/boa_vista/response/parser.rb', line 14

def call
  return @response if !@response.include?(INVALID_STRING)
  sanitize(navigate_to_node)
end