Class: Veto::IfUnlessConditions

Inherits:
Condition show all
Defined in:
lib/veto/conditions/if_unless_conditions.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ IfUnlessConditions

Returns a new instance of IfUnlessConditions.



3
4
5
# File 'lib/veto/conditions/if_unless_conditions.rb', line 3

def initialize(options)
  @options = options
end

Instance Method Details

#pass?(*args) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/veto/conditions/if_unless_conditions.rb', line 7

def pass?(*args)
  if_conditions.pass?(*args) && unless_conditions.pass?(*args)
end