Class: Locked::Commands::Identify

Inherits:
Object
  • Object
show all
Defined in:
lib/locked/commands/identify.rb

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ Identify

Returns a new instance of Identify.



6
7
8
# File 'lib/locked/commands/identify.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
# File 'lib/locked/commands/identify.rb', line 10

def build(options = {})
  Locked::Validators::NotSupported.call(options, %i[properties])
  context = Locked::Context::Merger.call(@context, options[:context])
  context = Locked::Context::Sanitizer.call(context)

  Locked::Command.new(
    'identify',
    options.merge(context: context),
    :post
  )
end