Module: Rolypoly::ControllerRoleDSL::ClassMethods

Defined in:
lib/rolypoly/controller_role_dsl.rb

Instance Method Summary collapse

Instance Method Details

#all_publicObject



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_gatekeepersObject



88
89
90
# File 'lib/rolypoly/controller_role_dsl.rb', line 88

def rolypoly_gatekeepers
  @rolypoly_gatekeepers ||= []
end