Sha256: a7c1acefc443628321bc53e053d69a31eef4a4db2520b1a2ddcba4871f0d4199

Contents?: true

Size: 1.26 KB

Versions: 1

Compression:

Stored size: 1.26 KB

Contents

class RubossMainAppGenerator < RubiGen::Base
  include Ruboss4Ruby::Configuration
  
  attr_reader :project_name, 
              :flex_project_name, 
              :base_package, 
              :base_folder, 
              :command_controller_name,
              :model_names, 
              :command_names,
              :component_names,
              :use_air,
              :application_tag

  def initialize(runtime_args, runtime_options = {})
    super
    @project_name, @flex_project_name, @command_controller_name, @base_package, @base_folder = extract_names

    project_file_name = APP_ROOT + '/.project'
    if File.exist?(project_file_name)
      @use_air = true if File.read(project_file_name) =~/com.adobe.flexbuilder.apollo.apollobuilder/m
    end

    if @use_air
      @application_tag = 'WindowedApplication'
    else
      @application_tag = 'Application'
    end

    @component_names = []
    if File.exists?("app/flex/#{base_folder}/components/generated")
      @component_names = list_mxml_files("app/flex/#{base_folder}/components/generated")
    end
  end

  def manifest
    record do |m|      
      m.template 'mainapp.mxml', File.join('app', 'flex', "#{project_name}.mxml")
    end
  end

  protected
    def banner
      "Usage: #{$0} #{spec.name}" 
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dima-ruboss4ruby-1.1.0 generators/ruboss_main_app/ruboss_main_app_generator.rb