Class: FlashTool::FlashScript

Inherits:
Flash
  • Object
show all
Defined in:
lib/flash_tool/flash_script.rb

Overview

Generates flash files from scripts and using swfc tool More about this wiki.swftools.org/index.php/Swfc

Instance Attribute Summary

Attributes inherited from Flash

#args, #info, #input, #output_path

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Flash

#method_missing, #save

Constructor Details

#initialize(input, tempfile = nil, &block) ⇒ FlashScript

Returns a new instance of FlashScript.



10
11
12
13
# File 'lib/flash_tool/flash_script.rb', line 10

def initialize(input, tempfile = nil, &block)
  @command = "swfc"
  super(input,@command,tempfile,&block)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class FlashTool::Flash

Class Method Details

.create(input, output) ⇒ Object

Creates flash from input script



28
29
30
# File 'lib/flash_tool/flash_script.rb', line 28

def self.create(input, output)
  return self.new(input).save(output)
end

.flash_data(input) ⇒ Object

Creates and return flash from input script



23
24
25
# File 'lib/flash_tool/flash_script.rb', line 23

def self.flash_data(input)
  return self.new(input).cgi
end

Instance Method Details

#cgiObject

Creates and return flash from input script Same as option cgi options, but don’t create file



17
18
19
20
# File 'lib/flash_tool/flash_script.rb', line 17

def cgi
  @args << "--cgi"
  run_command(@command,*@args << @input)
end