Class | EimXML::XHTML::FORM
In: | lib/eim_xml/xhtml.rb
Parent: | Simple_

### Methods

new

### Public Class methods

new(attributes={})

[Source]

        # File lib/eim_xml/xhtml.rb, line 54
    54:                 def initialize(attributes={})
    55:                         if attributes
    56:                                 if s = attributes.delete(:session)
    57:                                         name = attributes.delete(:session_name) || "token"
    58:                                         require "digest/sha1"
    59:                                         token = s[name] ||= Digest::SHA1.hexdigest("#{$$}#{Time.now}#{rand}")
    60:                                 end
    61:                         end
    62:                         super
    63:                         add(HIDDEN.new(:name=>name, :value=>token)) if token
    64:                 end

[Validate]