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, xpath_search_excluding_hidden
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.
341 342 343 |
# File 'lib/webrat/core/elements/field.rb', line 341 def content_type @content_type end |
Class Method Details
.xpath_search ⇒ Object
337 338 339 |
# File 'lib/webrat/core/elements/field.rb', line 337 def self.xpath_search ".//input[@type = 'file']" end |
Instance Method Details
#set(value, content_type = nil) ⇒ Object
343 344 345 346 |
# File 'lib/webrat/core/elements/field.rb', line 343 def set(value, content_type = nil) super(value) @content_type = content_type end |
#to_param ⇒ Object
348 349 350 351 352 353 354 |
# File 'lib/webrat/core/elements/field.rb', line 348 def to_param if @value.nil? super else replace_param_value(super, @value, test_uploaded_file) end end |