Module: Rolypoly::ControllerRoleDSL::ClassMethods
- Defined in:
- lib/rolypoly/controller_role_dsl.rb
Instance Method Summary collapse
- #all_public ⇒ Object
- #allow(*roles) ⇒ Object
- #publicize(*actions) ⇒ Object
- #restrict(*actions) ⇒ Object
- #rolypoly_gatekeepers ⇒ Object
Instance Method Details
#all_public ⇒ Object
72 73 74 |
# File 'lib/rolypoly/controller_role_dsl.rb', line 72 def all_public build_gatekeeper(nil, nil).all_public end |
#allow(*roles) ⇒ Object
80 81 82 |
# File 'lib/rolypoly/controller_role_dsl.rb', line 80 def allow(*roles) build_gatekeeper roles, nil end |
#publicize(*actions) ⇒ Object
84 85 86 |
# File 'lib/rolypoly/controller_role_dsl.rb', line 84 def publicize(*actions) restrict(*actions).to_none end |
#restrict(*actions) ⇒ Object
76 77 78 |
# File 'lib/rolypoly/controller_role_dsl.rb', line 76 def restrict(*actions) build_gatekeeper nil, actions end |
#rolypoly_gatekeepers ⇒ Object
88 89 90 |
# File 'lib/rolypoly/controller_role_dsl.rb', line 88 def rolypoly_gatekeepers @rolypoly_gatekeepers ||= [] end |