Class: Spinebox::Generator::Controller
- Inherits:
-
Object
- Object
- Spinebox::Generator::Controller
- Defined in:
- lib/spinebox/generator.rb
Overview
Generates a controller
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#source_name ⇒ Object
readonly
Returns the value of attribute source_name.
Instance Method Summary collapse
-
#initialize(name) ⇒ Controller
constructor
A new instance of Controller.
Constructor Details
#initialize(name) ⇒ Controller
Returns a new instance of Controller.
60 61 62 63 64 |
# File 'lib/spinebox/generator.rb', line 60 def initialize name @name, @source_name, @view_name = name.pluralize.camelize, name.pluralize, name.singularize compile_template write_source end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
55 56 57 |
# File 'lib/spinebox/generator.rb', line 55 def name @name end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
56 57 58 |
# File 'lib/spinebox/generator.rb', line 56 def source @source end |
#source_name ⇒ Object (readonly)
Returns the value of attribute source_name.
57 58 59 |
# File 'lib/spinebox/generator.rb', line 57 def source_name @source_name end |