Class: Slideit::Container
- Inherits:
-
Object
- Object
- Slideit::Container
- Defined in:
- lib/slideit/container.rb
Instance Method Summary collapse
-
#initialize(file, options = {}) ⇒ Container
constructor
A new instance of Container.
- #start ⇒ Object
Constructor Details
#initialize(file, options = {}) ⇒ Container
Returns a new instance of Container.
7 8 9 10 11 |
# File 'lib/slideit/container.rb', line 7 def initialize(file, = {}) @file = file @options = prepare end |
Instance Method Details
#start ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/slideit/container.rb', line 13 def start if @server file_name = File.basename(@file) url = "http://localhost:#{@port}/#{file_name}" if @options[:pdf] url << "?print-pdf" end Thread.new { puts "Just waiting for 1 second...\n" sleep 1 system "open #{url}" } @server.start end end |