Class: FlashPlayer::Executable
- Inherits:
-
Sprout::Executable::Base
- Object
- Sprout::Executable::Base
- FlashPlayer::Executable
- Defined in:
- lib/flashplayer/executable.rb
Instance Attribute Summary collapse
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
Instance Method Summary collapse
- #execute(*args) ⇒ Object
-
#fdb ⇒ Object
Drop into FDB after launching the Player.
-
#initialize ⇒ Executable
constructor
A new instance of Executable.
-
#input ⇒ Object
The file that the Flash Player should launch.
- #logger ⇒ Object
- #logger=(logger) ⇒ Object
- #use_fdb? ⇒ Boolean
-
#version ⇒ Object
The Flash Player version to use.
Constructor Details
#initialize ⇒ Executable
Returns a new instance of Executable.
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/flashplayer/executable.rb', line 27 def initialize super @mm_config = MMConfig.new @reader = LogFile.new @trust_config = Trust.new @process = nil @stdout = $stdout @stderr = $stderr @logger = $stdout self.pkg_name = FlashPlayer::NAME self.pkg_version = FlashPlayer::VERSION end |
Instance Attribute Details
#stderr ⇒ Object
Returns the value of attribute stderr.
7 8 9 |
# File 'lib/flashplayer/executable.rb', line 7 def stderr @stderr end |
#stdout ⇒ Object
Returns the value of attribute stdout.
6 7 8 |
# File 'lib/flashplayer/executable.rb', line 6 def stdout @stdout end |
Instance Method Details
#execute(*args) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/flashplayer/executable.rb', line 40 def execute *args execute_safely do update_mm_config update_trust_config_with input end if use_fdb? launch_fdb_and_player_with input else player_thread = launch_player_with input tail_flashlog player_thread end end |
#fdb ⇒ Object
Drop into FDB after launching the Player.
flashplayer --fdb bin/SomeProject.swf
21 |
# File 'lib/flashplayer/executable.rb', line 21 add_param :fdb, Boolean, { :hidden_value => true } |
#input ⇒ Object
The file that the Flash Player should launch.
flashplayer bin/SomeProject.swf
14 |
# File 'lib/flashplayer/executable.rb', line 14 add_param :input, String, { :hidden_name => true, :required => true } |
#logger ⇒ Object
68 69 70 |
# File 'lib/flashplayer/executable.rb', line 68 def logger @logger end |
#logger=(logger) ⇒ Object
61 62 63 64 65 66 |
# File 'lib/flashplayer/executable.rb', line 61 def logger=(logger) @logger = logger @mm_config.logger = logger @reader.logger = logger @trust_config.logger = logger end |
#use_fdb? ⇒ Boolean
54 55 56 57 58 59 |
# File 'lib/flashplayer/executable.rb', line 54 def use_fdb? # Check as string b/c this is # how the boolean value comes # accross the command line input. fdb || ENV['USE_FDB'].to_s == 'true' end |
#version ⇒ Object
The Flash Player version to use.
25 |
# File 'lib/flashplayer/executable.rb', line 25 add_param :version, String, { :default => FlashPlayer::VERSION } |