Class: Rails::Generator::DynamicNamedBase

Inherits:
Base
  • Object
show all
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

Instance Method Summary collapse

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, runtime_options = {})
  super
  
  # No arguments are required.
  usage if runtime_args.length > 0
  
  @all_attrs = {}
end

Instance Attribute Details

#all_attrsObject (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_contentsObject

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_nameObject (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_nestingObject (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_depthObject (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_pathObject (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_nameObject (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_nestingObject (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_depthObject (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_pathObject (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_pathObject (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_nameObject (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_nameObject (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_nameObject (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_pathObject (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

#nameObject (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_nameObject (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_nameObject (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

#superklassObject

Returns the value of attribute superklass.



9
10
11
# File 'lib/rails/generator/dynamic_named_base.rb', line 9

def superklass
  @superklass
end

#table_nameObject (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