Class: BloggingLicense
- Inherits:
-
License::Base
- Object
- License::Base
- BloggingLicense
- Defined in:
- lib/generators/permits/templates/blogging_license.rb
Instance Attribute Summary
Attributes inherited from License::Base
Instance Method Summary collapse
- #enforce! ⇒ Object
-
#initialize(name) ⇒ BloggingLicense
constructor
A new instance of BloggingLicense.
Methods inherited from License::Base
Constructor Details
#initialize(name) ⇒ BloggingLicense
Returns a new instance of BloggingLicense.
2 3 4 |
# File 'lib/generators/permits/templates/blogging_license.rb', line 2 def initialize name super end |
Instance Method Details
#enforce! ⇒ Object
6 7 8 9 10 |
# File 'lib/generators/permits/templates/blogging_license.rb', line 6 def enforce! can(:read, Blog) can(:create, Post) owns(user, Post) end |