Class: FlashPlayer::Task

Inherits:
Rake::Task
  • Object
show all
Defined in:
flashsdk/lib/flashplayer/task.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Task) initialize(task_name, rake_application)

This is the Rake::Task constructor signature...



16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'flashsdk/lib/flashplayer/task.rb', line 16

def initialize task_name, rake_application
  super
  @mm_config    = MMConfig.new
  @reader       = LogFile.new
  @trust_config = Trust.new
  @process      = nil
  @input        = task_name
  @stdout       = $stdout
  @stderr       = $stderr
  @logger       = $stdout

  @pkg_name     = FlashPlayer::NAME
  @pkg_version  = FlashPlayer::VERSION
end

Instance Attribute Details

- (Object) input

Returns the value of attribute input



6
7
8
# File 'flashsdk/lib/flashplayer/task.rb', line 6

def input
  @input
end

- (Object) pkg_name

Returns the value of attribute pkg_name



7
8
9
# File 'flashsdk/lib/flashplayer/task.rb', line 7

def pkg_name
  @pkg_name
end

- (Object) pkg_version

Returns the value of attribute pkg_version



8
9
10
# File 'flashsdk/lib/flashplayer/task.rb', line 8

def pkg_version
  @pkg_version
end

- (Object) stderr

Returns the value of attribute stderr



11
12
13
# File 'flashsdk/lib/flashplayer/task.rb', line 11

def stderr
  @stderr
end

- (Object) stdout

Returns the value of attribute stdout



10
11
12
# File 'flashsdk/lib/flashplayer/task.rb', line 10

def stdout
  @stdout
end

Instance Method Details

- (Object) execute(*args)



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'flashsdk/lib/flashplayer/task.rb', line 31

def execute *args
  super
  update_input_if_necessary
  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

- (Object) logger



54
55
56
# File 'flashsdk/lib/flashplayer/task.rb', line 54

def logger
  @logger
end

- (Object) logger=(logger)



47
48
49
50
51
52
# File 'flashsdk/lib/flashplayer/task.rb', line 47

def logger=(logger)
  @logger              = logger
  @mm_config.logger    = logger
  @reader.logger       = logger
  @trust_config.logger = logger
end