Class: Locked::Commands::Verify
- Inherits:
-
Object
- Object
- Locked::Commands::Verify
- Defined in:
- lib/locked/commands/verify.rb
Instance Method Summary collapse
- #build(path, body, **options) ⇒ Object
-
#initialize(context) ⇒ Verify
constructor
A new instance of Verify.
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, **) context = Locked::Context::Merger.call(@context, [:context]) context = Locked::Context::Sanitizer.call(context) body_with_context = body.merge(context: context) Locked::Command.new(path, body_with_context, :post) end |