Class: ViewHelperGenerator

Inherits:
Genosaurus
  • Object
show all
Defined in:
lib/mack/generators/view_helper_generator/view_helper_generator.rb

Overview

Generates view helpers for Mack applications.

Example:

rake generate:view_helper name=post

Instance Method Summary collapse

Instance Method Details

#setupObject

:nodoc:



9
10
11
12
13
14
# File 'lib/mack/generators/view_helper_generator/view_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