Class: Castle::Commands::EndImpersonation
- Inherits:
-
Object
- Object
- Castle::Commands::EndImpersonation
- Defined in:
- lib/castle/commands/end_impersonation.rb
Overview
builder for impersonate command
Class Method Summary collapse
Class Method Details
.build(options = {}) ⇒ Castle::Command
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/castle/commands/end_impersonation.rb', line 10 def build( = {}) Castle::Validators::Present.call(, %i[user_id]) context = Castle::Context::Sanitize.call([:context]) Castle::Validators::Present.call(context, %i[user_agent ip]) Castle::Command.new( 'impersonate', .merge(context: context, sent_at: Castle::Utils::GetTimestamp.call), :delete ) end |