Sha256: 64f37974a63e9eb34e8eb4038371b6daab4241e6f72ff63f46b40af00361bdf3

Contents?: true

Size: 1 KB

Versions: 11

Compression:

Stored size: 1 KB

Contents

require File.join(File.dirname(__FILE__), '..', '..', 'lib', 'restfulx') if !defined?(RestfulX)

class RxControllerGenerator < Rails::Generator::Base
  include RestfulX::Configuration
  
  attr_reader :project_name, 
              :flex_project_name, 
              :base_package, 
              :base_folder, 
              :command_controller_name,
              :model_names, 
              :command_names,
              :flex_root,
              :distributed

  def initialize(runtime_args, runtime_options = {})
    super
    @project_name, @flex_project_name, @command_controller_name, @base_package, @base_folder, 
      @flex_root, @distributed = extract_names
    
    @model_names = list_as_files("#{@flex_root}/#{@base_folder}/models")
    @command_names = list_as_files("#{@flex_root}/#{@base_folder}/commands")
  end

  def manifest
    record do |m|      
      m.template 'controller.as.erb', File.join("#{@flex_root}/#{@base_folder}/controllers", 
        "#{@command_controller_name}.as")
    end
  end
end

Version data entries

11 entries across 11 versions & 4 rubygems

Version Path
captproton-restfulx-1.2.3 rails_generators/rx_controller/rx_controller_generator.rb
dima-restfulx-1.2.2 rails_generators/rx_controller/rx_controller_generator.rb
dima-restfulx-1.2.3 rails_generators/rx_controller/rx_controller_generator.rb
dima-restfulx-1.2.4 rails_generators/rx_controller/rx_controller_generator.rb
rlmattax-restfulx-1.2.4.1 rails_generators/rx_controller/rx_controller_generator.rb
restfulx-1.3.1 rails_generators/rx_controller/rx_controller_generator.rb
restfulx-1.3.0 rails_generators/rx_controller/rx_controller_generator.rb
restfulx-1.2.5 rails_generators/rx_controller/rx_controller_generator.rb
restfulx-1.2.3 rails_generators/rx_controller/rx_controller_generator.rb
restfulx-1.2.4 rails_generators/rx_controller/rx_controller_generator.rb
restfulx-1.2.2 rails_generators/rx_controller/rx_controller_generator.rb