Guest User

Untitled

a guest
Jan 18th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. class InterfaceController < ApplicationController
  2.  
  3. def interface_defintion
  4. {
  5. "HL7" => {
  6. "Version_2_3" => Services::Interfaces::HL7::Version_2_3.new
  7. },
  8. "GDT" => {
  9. "Version_2_1" => Services::Interfaces::GDT::Version_2_1.new
  10. },
  11. # more interfaces...
  12. }
  13. end
  14.  
  15. def import
  16. interface_version = @konfig_interface.version
  17. interface_typ = @konfig_interface.typ
  18.  
  19. result = interface_definition[interface_typ][interface_version].export(@konfig_interface)
  20.  
  21. # ... handle result and process post import steps (send mail, ...)
  22. end
  23.  
  24. # other stuff...
  25. end
Add Comment
Please, Sign In to add comment