Class: Webrat::FileField
- Defined in:
- lib/webrat/core/elements/field.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
Attributes inherited from Field
Attributes inherited from Element
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Field
#disabled?, field_class, field_classes, #id, inherited, #initialize, #label_text, load, #raise_error_if_disabled, #unset
Methods inherited from Element
#initialize, #inspect, load, load_all, #path
Constructor Details
This class inherits a constructor from Webrat::Field
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
324 325 326 |
# File 'lib/webrat/core/elements/field.rb', line 324 def content_type @content_type end |
Class Method Details
.xpath_search ⇒ Object
320 321 322 |
# File 'lib/webrat/core/elements/field.rb', line 320 def self.xpath_search ".//input[@type = 'file']" end |
Instance Method Details
#set(value, content_type = nil) ⇒ Object
326 327 328 329 |
# File 'lib/webrat/core/elements/field.rb', line 326 def set(value, content_type = nil) super(value) @content_type = content_type end |
#to_param ⇒ Object
331 332 333 334 335 336 337 |
# File 'lib/webrat/core/elements/field.rb', line 331 def to_param if @value.nil? super else replace_param_value(super, @value, test_uploaded_file) end end |