class Granite::Action::Preconditions::PreconditionsCollection

Public Class Methods

new(*preconditions) click to toggle source
# File lib/granite/action/preconditions.rb, line 21
def initialize(*preconditions)
  @preconditions = preconditions.flatten
end

Public Instance Methods

+(other) click to toggle source
# File lib/granite/action/preconditions.rb, line 25
def +(other)
  self.class.new(*@preconditions, other)
end
execute!(context) click to toggle source
# File lib/granite/action/preconditions.rb, line 29
def execute!(context)
  @preconditions.each { |precondition| precondition.execute!(context) }
end