Class: Dradis::Plugins::Upload::FieldProcessor
- Inherits:
-
Object
- Object
- Dradis::Plugins::Upload::FieldProcessor
- Defined in:
- lib/dradis/plugins/upload/field_processor.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ FieldProcessor
constructor
A new instance of FieldProcessor.
-
#value(args = {}) ⇒ Object
Inspect the data object currently stored in this processor instance and extract the value of the requested field.
Constructor Details
#initialize(args = {}) ⇒ FieldProcessor
Returns a new instance of FieldProcessor.
12 13 14 15 |
# File 'lib/dradis/plugins/upload/field_processor.rb', line 12 def initialize(args={}) @data = args[:data] post_initialize(args) end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
10 11 12 |
# File 'lib/dradis/plugins/upload/field_processor.rb', line 10 def data @data end |
Instance Method Details
#value(args = {}) ⇒ Object
Inspect the data object currently stored in this processor instance and extract the value of the requested field.
Subclasses will overwrite this method.
21 22 23 24 |
# File 'lib/dradis/plugins/upload/field_processor.rb', line 21 def value(args={}) field = args[:field] "Sorry, this plugin doesn't define a FieldProcessor (called for [#{field}])" end |