Class: Granite::Action::Preconditions::BasePrecondition
- Inherits:
-
Object
- Object
- Granite::Action::Preconditions::BasePrecondition
show all
- Defined in:
- lib/granite/action/preconditions/base_precondition.rb
Instance Method Summary
collapse
Constructor Details
5
6
7
8
9
|
# File 'lib/granite/action/preconditions/base_precondition.rb', line 5
def initialize(*args, &block)
@options = args.
@args = args
@block = block
end
|
Instance Method Details
#execute!(context) ⇒ Object
11
12
13
|
# File 'lib/granite/action/preconditions/base_precondition.rb', line 11
def execute!(context)
_execute(context) if context.conditions_satisfied?(**@options)
end
|