Class: Web::Unit::InputCheckbox

Inherits:
Input show all
Defined in:
lib/web/unit/params.rb

Instance Attribute Summary

Attributes inherited from Param

#name, #relations, #stat, #type, #value

Attributes inherited from HtmlElem

#array, #attrs, #children, #data, #name, #tag

Instance Method Summary collapse

Methods inherited from Input

#initialize, #inspect, #off, #on

Methods inherited from Param

#initialize, #update

Methods inherited from HtmlElem

#append, #extract, #find, #has?, #initialize, #inspect, #print, #readlink, #search

Constructor Details

This class inherits a constructor from Web::Unit::Input

Instance Method Details

#multipart_query_data(boundary) ⇒ Object



103
104
105
106
107
108
109
# File 'lib/web/unit/params.rb', line 103

def multipart_query_data( boundary)
  if @stat == 'on'
    super( boundary)
  else
    nil
  end
end

#query_dataObject



98
99
100
101
# File 'lib/web/unit/params.rb', line 98

def query_data
  value = @value ? CGI::escape( @value ) : 'on'
  (@stat == 'on' and @name) ? @name + '=' + value : nil
end