Class: Auth::Generators::RouteGenerator
- Inherits:
-
Rails::Generator::NamedBase
- Object
- Rails::Generator::NamedBase
- Auth::Generators::RouteGenerator
- Defined in:
- lib/auth/generators/route_generator.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
-
#initialize(model, options = {}) ⇒ RouteGenerator
constructor
A new instance of RouteGenerator.
- #manifest ⇒ Object
- #spec ⇒ Object
Constructor Details
#initialize(model, options = {}) ⇒ RouteGenerator
Returns a new instance of RouteGenerator.
4 5 6 7 8 |
# File 'lib/auth/generators/route_generator.rb', line 4 def initialize(model, = {}) @model = model args = [ model.name ] super(args, ) end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
2 3 4 |
# File 'lib/auth/generators/route_generator.rb', line 2 def model @model end |
Instance Method Details
#manifest ⇒ Object
10 11 12 13 14 |
# File 'lib/auth/generators/route_generator.rb', line 10 def manifest record do |m| m.route_resources plural_name end end |