Class: LoquendoRuby::Parser
- Inherits:
-
Object
- Object
- LoquendoRuby::Parser
- Defined in:
- lib/utils/parser.rb
Overview
This is the class for parse some values
Instance Method Summary collapse
Instance Method Details
#extract_csrf_token(html) ⇒ Object
21 22 23 24 25 |
# File 'lib/utils/parser.rb', line 21 def extract_csrf_token(html) regex = %r{<input type="hidden" name="csrf_test_name" value="([A-Fa-f0-9]{32})" />} csrf_match = html.match(regex) csrf_match[1] if csrf_match end |