Module: EasyApiDoc::Options
- Defined in:
- lib/easy_api_doc/options.rb
Class Method Summary collapse
Class Method Details
.authenticate_with(&block) ⇒ Object
5 6 7 8 |
# File 'lib/easy_api_doc/options.rb', line 5 def authenticate_with(&block) @authenticate = block if block @authenticate || Proc.new {} end |
.authorize_with(*args, &block) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/easy_api_doc/options.rb', line 10 def (*args, &block) = args.shift current_user_method = args.shift if = Proc.new { @current_user_method = current_user_method = ('EasyApiDoc::' + .to_s.classify).constantize.new(self, @current_user_method) } else = block if block end || Proc.new {} end |