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.
363 364 365 |
# File 'lib/webrat/core/elements/field.rb', line 363 def content_type @content_type end |
Class Method Details
.xpath_search ⇒ Object
359 360 361 |
# File 'lib/webrat/core/elements/field.rb', line 359 def self.xpath_search ".//input[@type = 'file']" end |
Instance Method Details
#set(value, content_type = nil) ⇒ Object
365 366 367 368 |
# File 'lib/webrat/core/elements/field.rb', line 365 def set(value, content_type = nil) super(value) @content_type = content_type end |
#to_param ⇒ Object
370 371 372 373 374 375 376 |
# File 'lib/webrat/core/elements/field.rb', line 370 def to_param if @value.nil? super else replace_param_value(super, @value, test_uploaded_file) end end |