Class: FlashSDK::ProjectGenerator

Inherits:
ClassGenerator show all
Defined in:
flashsdk/lib/flashsdk/generators/project_generator.rb

Direct Known Subclasses

FlexProjectGenerator

Constant Summary

Constants included from Sprout::Executable

DEFAULT_FILE_EXPRESSION, DEFAULT_PREFIX, DEFAULT_SHORT_PREFIX

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods included from FlashHelper

#actionscript_file_to_class_name, #class_directory, #class_name, #debug_swf_name, #default_package_name, #deploy_swf_name, #fully_qualified_class_name, #input_in_parts, #instance_name, #package_directory, #package_name, #project_name, #remove_file_extensions, #remove_slashes, #split_package, #test_case_classes, #test_cases, #test_cases=, #test_class_directory, #test_class_name, #test_glob, #test_glob=, #test_runner_name, #test_swf_name

Methods inherited from Sprout::Generator::Base

#create_template_paths, #default_search_paths, #directory, #do_show_template_paths, #execute, #file, #generator, inherited, #prepare_command, #resolve_template, #say, #template, #template_paths, #unexecute, #validate

Methods inherited from Sprout::Executable::Base

add_param, add_param_alias, #binary_path, #binary_path=, #create_outer_task, #default_file_expression, #execute, #execute_delegate, #from_hash, #initialize, #library_added, #parse!, #parse_extra_options!, #parse_rake_task_arg, #prepare, set, static_default_value_collection, static_parameter_collection, #stderr, #stderr=, #stdout, #stdout=, #system_execute, #to_hash, #to_help, #to_rake, #to_shell, #update_rake_task_name_from_args

Methods included from Sprout::Concern

#append_features, extended, #included

Constructor Details

This class inherits a constructor from Sprout::Executable::Base

Instance Attribute Details

- (Path) css

An instance of Path

Returns:

  • (Path)

    An instance of Path



# File ''

add_param :css, Path, { :default => 'css' }

- (Path) fonts

An instance of Path

Returns:

  • (Path)

    An instance of Path



# File ''

add_param :fonts, Path, { :default => 'fonts' }

- (Path) images

An instance of Path

Returns:

  • (Path)

    An instance of Path



# File ''

add_param :images, Path, { :default => 'images' }

Instance Method Details

- (Object) manifest



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'flashsdk/lib/flashsdk/generators/project_generator.rb', line 8

def manifest
  directory input do
    template 'rakefile.rb'
    template 'Gemfile'

    directory src do
      template "#{input.camel_case}.as", 'ActionScript3MainClass.as'
      template "#{test_runner_name}.as", 'ActionScript3RunnerClass.as'
    end

    directory assets do
      directory skins do
        file 'DefaultProjectImage.png'
      end
    end

    # Create empty directories:
    directory lib
    directory bin
  end
end