Class: Locked::Commands::Authenticate
- Inherits:
-
Object
- Object
- Locked::Commands::Authenticate
- Defined in:
- lib/locked/commands/authenticate.rb
Instance Method Summary collapse
- #build(options = {}) ⇒ Object
-
#initialize(context) ⇒ Authenticate
constructor
A new instance of Authenticate.
Constructor Details
#initialize(context) ⇒ Authenticate
Returns a new instance of Authenticate.
6 7 8 |
# File 'lib/locked/commands/authenticate.rb', line 6 def initialize(context) @context = context end |
Instance Method Details
#build(options = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/locked/commands/authenticate.rb', line 10 def build( = {}) Locked::Validators::Present.call(, %i[event]) context = Locked::Context::Merger.call(@context, [:context]) context = Locked::Context::Sanitizer.call(context) = Locked::Configurations::Merger.call() Locked::Command.new( 'authenticate', .merge(context: context), :post ) end |