Class: Rails::Generator::DynamicNamedBase
- Inherits:
-
Base
- Object
- Base
- Rails::Generator::DynamicNamedBase
- Defined in:
- lib/rails/generator/dynamic_named_base.rb
Constant Summary collapse
- @@model_attrs =
alias_method :base_controller_file_path, :controller_file_path
%w(name class_name singular_name plural_name table_name class_path file_path class_nesting class_nesting_depth file_name singular_name superklass class_contents)
- @@controller_attrs =
%w(controller_name controller_class_path controller_file_path controller_class_nesting controller_class_nesting_depth controller_class_name controller_singular_name controller_plural_name)
Instance Attribute Summary collapse
-
#all_attrs ⇒ Object
readonly
Returns the value of attribute all_attrs.
-
#class_contents ⇒ Object
Returns the value of attribute class_contents.
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#class_nesting ⇒ Object
readonly
Returns the value of attribute class_nesting.
-
#class_nesting_depth ⇒ Object
readonly
Returns the value of attribute class_nesting_depth.
-
#class_path ⇒ Object
readonly
Returns the value of attribute class_path.
-
#controller_class_name ⇒ Object
readonly
Returns the value of attribute controller_class_name.
-
#controller_class_nesting ⇒ Object
readonly
Returns the value of attribute controller_class_nesting.
-
#controller_class_nesting_depth ⇒ Object
readonly
Returns the value of attribute controller_class_nesting_depth.
-
#controller_class_path ⇒ Object
readonly
Returns the value of attribute controller_class_path.
-
#controller_file_path ⇒ Object
readonly
Returns the value of attribute controller_file_path.
-
#controller_name ⇒ Object
readonly
Returns the value of attribute controller_name.
-
#controller_plural_name ⇒ Object
(also: #controller_table_name)
readonly
Returns the value of attribute controller_plural_name.
-
#controller_singular_name ⇒ Object
(also: #controller_file_name)
readonly
Returns the value of attribute controller_singular_name.
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#plural_name ⇒ Object
readonly
Returns the value of attribute plural_name.
-
#singular_name ⇒ Object
(also: #file_name)
readonly
Returns the value of attribute singular_name.
-
#superklass ⇒ Object
Returns the value of attribute superklass.
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
Instance Method Summary collapse
-
#initialize(runtime_args, runtime_options = {}) ⇒ DynamicNamedBase
constructor
A new instance of DynamicNamedBase.
Constructor Details
#initialize(runtime_args, runtime_options = {}) ⇒ DynamicNamedBase
Returns a new instance of DynamicNamedBase.
32 33 34 35 36 37 38 39 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 32 def initialize(runtime_args, = {}) super # No arguments are required. usage if runtime_args.length > 0 @all_attrs = {} end |
Instance Attribute Details
#all_attrs ⇒ Object (readonly)
Returns the value of attribute all_attrs.
6 7 8 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 6 def all_attrs @all_attrs end |
#class_contents ⇒ Object
Returns the value of attribute class_contents.
9 10 11 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 9 def class_contents @class_contents end |
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
6 7 8 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 6 def class_name @class_name end |
#class_nesting ⇒ Object (readonly)
Returns the value of attribute class_nesting.
6 7 8 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 6 def class_nesting @class_nesting end |
#class_nesting_depth ⇒ Object (readonly)
Returns the value of attribute class_nesting_depth.
6 7 8 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 6 def class_nesting_depth @class_nesting_depth end |
#class_path ⇒ Object (readonly)
Returns the value of attribute class_path.
6 7 8 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 6 def class_path @class_path end |
#controller_class_name ⇒ Object (readonly)
Returns the value of attribute controller_class_name.
11 12 13 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 11 def controller_class_name @controller_class_name end |
#controller_class_nesting ⇒ Object (readonly)
Returns the value of attribute controller_class_nesting.
11 12 13 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 11 def controller_class_nesting @controller_class_nesting end |
#controller_class_nesting_depth ⇒ Object (readonly)
Returns the value of attribute controller_class_nesting_depth.
11 12 13 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 11 def controller_class_nesting_depth @controller_class_nesting_depth end |
#controller_class_path ⇒ Object (readonly)
Returns the value of attribute controller_class_path.
11 12 13 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 11 def controller_class_path @controller_class_path end |
#controller_file_path ⇒ Object (readonly)
Returns the value of attribute controller_file_path.
11 12 13 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 11 def controller_file_path @controller_file_path end |
#controller_name ⇒ Object (readonly)
Returns the value of attribute controller_name.
11 12 13 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 11 def controller_name @controller_name end |
#controller_plural_name ⇒ Object (readonly) Also known as: controller_table_name
Returns the value of attribute controller_plural_name.
11 12 13 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 11 def controller_plural_name @controller_plural_name end |
#controller_singular_name ⇒ Object (readonly) Also known as: controller_file_name
Returns the value of attribute controller_singular_name.
11 12 13 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 11 def controller_singular_name @controller_singular_name end |
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
6 7 8 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 6 def file_path @file_path end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 6 def name @name end |
#plural_name ⇒ Object (readonly)
Returns the value of attribute plural_name.
6 7 8 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 6 def plural_name @plural_name end |
#singular_name ⇒ Object (readonly) Also known as: file_name
Returns the value of attribute singular_name.
6 7 8 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 6 def singular_name @singular_name end |
#superklass ⇒ Object
Returns the value of attribute superklass.
9 10 11 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 9 def superklass @superklass end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
6 7 8 |
# File 'lib/rails/generator/dynamic_named_base.rb', line 6 def table_name @table_name end |