Sha256: 4355fd38ba9bccf0a4e565d9325a9bd8911e593581d52ffab0b97cf3216dda32

Contents?: true

Size: 984 Bytes

Versions: 1

Compression:

Stored size: 984 Bytes

Contents

class RubossControllerGenerator < 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
    
    @model_names = list_as_files("app/flex/#{base_folder}/models")
    @command_names = list_as_files("app/flex/#{base_folder}/commands")
  end

  def manifest
    record do |m|      
      m.template 'controller.as.erb', File.join("app/flex/#{base_folder}/controllers", 
        "#{command_controller_name}.as")      
    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_controller/ruboss_controller_generator.rb