Class: EdifactConverter::Result
- Inherits:
-
Object
- Object
- EdifactConverter::Result
- Includes:
- ConverterMethods
- Defined in:
- lib/edifact_converter/result.rb
Constant Summary collapse
- ATTRIBUTES =
[:xml, :ast, :edifact, :properties, :source_format]
Instance Method Summary collapse
-
#initialize(options) ⇒ Result
constructor
A new instance of Result.
- #properties ⇒ Object
Methods included from ConverterMethods
#binary, #convert, #format_edifact, #html, #verify
Constructor Details
#initialize(options) ⇒ Result
Returns a new instance of Result.
16 17 18 19 20 21 22 |
# File 'lib/edifact_converter/result.rb', line 16 def initialize() .each do |key, value| if ATTRIBUTES.member? key.to_sym self.send "#{key}=", value end end end |
Instance Method Details
#properties ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/edifact_converter/result.rb', line 24 def properties @properties ||= Hash.new do |hash,key| case key when :errors hash[key] = [] when :warnings hash[key] = [] else nil end end end |