Class: FlashTool::FlashScript
- 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
-
.create(input, output) ⇒ Object
Creates flash from input script.
-
.flash_data(input) ⇒ Object
Creates and return flash from input script.
Instance Method Summary collapse
-
#cgi ⇒ Object
Creates and return flash from input script Same as option cgi options, but don’t create file.
-
#initialize(input, tempfile = nil, &block) ⇒ FlashScript
constructor
A new instance of FlashScript.
Methods inherited from Flash
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
#cgi ⇒ Object
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 |