Class: Dradis::Plugins::Upload::FieldProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/dradis/plugins/upload/field_processor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject (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