Class: ControllerHelperGenerator

Inherits:
Genosaurus show all
Defined in:
lib/mack/generators/controller_helper_generator/controller_helper_generator.rb

Overview

Generates controller helpers for Mack applications.

Example:

rake generate:controller_helper name=post

Instance Method Summary collapse

Methods inherited from Genosaurus

#after_generate, #before_generate, #copy, describe, description_detail, #directory, #generate, #initialize, #manifest, #manifest_path, #method_missing, #param, require_param, required_params, run, #template, #templates_directory_path

Constructor Details

This class inherits a constructor from Genosaurus

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Genosaurus

Instance Method Details

#setupObject

:nodoc:



9
10
11
12
13
14
# File 'lib/mack/generators/controller_helper_generator/controller_helper_generator.rb', line 9

def setup # :nodoc:
  @name_singular = param(:name).singular.underscore
  @name_plural = param(:name).plural.underscore
  @name_singular_camel = @name_singular.camelcase
  @name_plural_camel = @name_plural.camelcase
end