Class: FlashSDK::ClassGenerator
- Inherits:
-
Sprout::Generator::Base
- Object
- Sprout::Generator::Base
- FlashSDK::ClassGenerator
- Includes:
- FlashHelper
- Defined in:
- lib/flashsdk/generators/class_generator.rb
Overview
This Generator will create a new ActionScript class based on the ActionScript3Class.as
template.
This Generator should only be executed from within a project that has a Gemfile. If your Gemfile loads the “asunit4” gem, a test case and test suite will also be created whenever this generator is run.
You can run this generator as follows:
$ sprout-class utils.MathUtil
You can prevent the creation of a test case and test suite by sending in the --no-test
parameter as follows:
$ sprout-class utils.MathUtil --no-test
Direct Known Subclasses
Instance Method Summary collapse
-
#assets ⇒ String
The path where assets will be created.
-
#bin ⇒ String
The path where binaries should be created.
-
#doc ⇒ String
The path where documentation should be created.
-
#lib ⇒ String
The path where libraries should be added.
- #manifest ⇒ Object
-
#package ⇒ String
The default package to use.
-
#skins ⇒ String
The path where skins will be created.
-
#src ⇒ String
The path where source files should be created.
-
#test ⇒ String
The path where test cases should be created.
-
#test_class ⇒ Boolean
Call the TestClassGenerator after creating class.
Instance Method Details
#assets ⇒ String
Returns The path where assets will be created.
31 |
# File 'lib/flashsdk/generators/class_generator.rb', line 31 add_param :assets, String, { :default => 'assets' } |
#bin ⇒ String
Returns The path where binaries should be created.
47 |
# File 'lib/flashsdk/generators/class_generator.rb', line 47 add_param :bin, String, { :default => 'bin' } |
#doc ⇒ String
Returns The path where documentation should be created.
55 |
# File 'lib/flashsdk/generators/class_generator.rb', line 55 add_param :doc, String, { :default => 'doc' } |
#lib ⇒ String
Returns The path where libraries should be added.
43 |
# File 'lib/flashsdk/generators/class_generator.rb', line 43 add_param :lib, String, { :default => 'lib' } |
#manifest ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/flashsdk/generators/class_generator.rb', line 61 def manifest if(!input.match(/Test$/)) directory class_directory do template "#{class_name}.as", 'ActionScript3Class.as' end end if test_class generator :test_class, :input => "#{fully_qualified_class_name}Test" end end |
#package ⇒ String
Returns The default package to use.
27 |
# File 'lib/flashsdk/generators/class_generator.rb', line 27 add_param :package, String, { :default => ""} |
#skins ⇒ String
Returns The path where skins will be created.
35 |
# File 'lib/flashsdk/generators/class_generator.rb', line 35 add_param :skins, String, { :default => 'skins' } |
#src ⇒ String
Returns The path where source files should be created.
51 |
# File 'lib/flashsdk/generators/class_generator.rb', line 51 add_param :src, String, { :default => 'src' } |
#test ⇒ String
Returns The path where test cases should be created.
39 |
# File 'lib/flashsdk/generators/class_generator.rb', line 39 add_param :test, String, { :default => 'test' } |
#test_class ⇒ Boolean
Returns Call the TestClassGenerator after creating class.
59 |
# File 'lib/flashsdk/generators/class_generator.rb', line 59 add_param :test_class, Boolean, { :default => true } |