Class: Locked::Commands::Verify

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

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ Verify

Returns a new instance of Verify.



6
7
8
# File 'lib/locked/commands/verify.rb', line 6

def initialize(context)
  @context = context
end

Instance Method Details

#build(path, body, **options) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/locked/commands/verify.rb', line 10

def build(path, body, **options)
  context = Locked::Context::Merger.call(@context, options[:context])
  context = Locked::Context::Sanitizer.call(context)
  body_with_context = body.merge(context: context)

  Locked::Command.new(path, body_with_context, :post)
end