Module: Hubbado::Sequence::Macros::Policy::Check::Substitute

Includes:
RecordInvocation
Defined in:
lib/hubbado/sequence/macros/policy/check.rb

Instance Method Summary collapse

Instance Method Details

#checked?(**kwargs) ⇒ Boolean

Returns:

  • (Boolean)


65
66
67
# File 'lib/hubbado/sequence/macros/policy/check.rb', line 65

def checked?(**kwargs)
  invoked?(:call, **kwargs)
end

#fail_with(**error_attrs) ⇒ Object



46
47
48
49
# File 'lib/hubbado/sequence/macros/policy/check.rb', line 46

def fail_with(**error_attrs)
  @configured_error = error_attrs
  self
end

#succeed_with(policy_instance = nil) ⇒ Object



40
41
42
43
44
# File 'lib/hubbado/sequence/macros/policy/check.rb', line 40

def succeed_with(policy_instance = nil)
  @configured_success = true
  @return_policy = policy_instance
  self
end