Class: Nite::Owl::IfNot

Inherits:
PredicateAction show all
Defined in:
lib/nite/owl/niteowl.rb

Instance Attribute Summary

Attributes inherited from Action

#parent

Instance Method Summary collapse

Methods inherited from PredicateAction

#call, #expired?, #expires

Methods inherited from Action

#add, #after, #also, #call, call_all_deferred_actions, #cancel, #changes, #contains?, #created, #current_action, #defer, #delay, #deleted, #handle_delay, #if_not, #ignore, #modified, #only_if, #only_once, #remove, #renamed, #root, #run, #undefer

Constructor Details

#initialize(block) ⇒ IfNot

Returns a new instance of IfNot.



388
389
390
391
# File 'lib/nite/owl/niteowl.rb', line 388

def initialize(block)
  super()
  @predicate = block
end

Instance Method Details

#predicate?(name, flags) ⇒ Boolean

Returns:

  • (Boolean)


392
393
394
# File 'lib/nite/owl/niteowl.rb', line 392

def predicate?(name,flags)
  not @predicate.call(name,flags)
end