Class: Vantiv::Certification::PaypageServer
- Inherits:
-
Object
- Object
- Vantiv::Certification::PaypageServer
- Defined in:
- lib/vantiv/certification/paypage_server.rb
Instance Method Summary collapse
-
#initialize(threaded: true) ⇒ PaypageServer
constructor
A new instance of PaypageServer.
- #root_path ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(threaded: true) ⇒ PaypageServer
Returns a new instance of PaypageServer.
8 9 10 11 12 |
# File 'lib/vantiv/certification/paypage_server.rb', line 8 def initialize(threaded: true) @threaded = threaded @template = "#{Vantiv.root}/lib/vantiv/certification/views/index.html.erb" @static_file_dir = "#{Vantiv.root}/tmp/e-protect" end |
Instance Method Details
#root_path ⇒ Object
22 23 24 |
# File 'lib/vantiv/certification/paypage_server.rb', line 22 def root_path "http://localhost:#{port}" end |
#start ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/vantiv/certification/paypage_server.rb', line 14 def start if threaded @server_thread = Thread.new { start_server } else start_server end end |
#stop ⇒ Object
26 27 28 |
# File 'lib/vantiv/certification/paypage_server.rb', line 26 def stop threaded ? Thread.kill(server_thread) : stop_server end |