Sha256: 032345f6db50f9c5bdc906891ad8d235c83ddf3c766f1f6673ee4ee9d0d363c2

Contents?: true

Size: 293 Bytes

Versions: 1

Compression:

Stored size: 293 Bytes

Contents

module Horseman
  class HiddenFields
    attr_reader :tokens

    def initialize(html)
      rx = /<input.* type=["']hidden["'].* name=["'](\S+)["'].* value=["'](\S*)["'].* \/>/
      @tokens = {}
      html.scan(rx).each {|field|
        @tokens[field[0]] = field[1]
      }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
horseman-0.0.1 lib/horseman/hidden_fields.rb