Class: Aclatraz::Suspect::SemanticRoles::Not
- Defined in:
- lib/aclatraz/suspect.rb
Overview
Yes
Constant Summary
Constants inherited from Base
Constants inherited from Roles
Instance Attribute Summary
Attributes inherited from Roles
Instance Method Summary collapse
-
#reader(*args, &blk) ⇒ Object
Check if specified suspect have assigned given role.
-
#writer(*args) ⇒ Object
Deletes given role from suspected object.
Methods inherited from Base
Methods inherited from Roles
#all, #assign, #delete, #has?, #initialize
Constructor Details
This class inherits a constructor from Aclatraz::Suspect::Roles
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Aclatraz::Suspect::SemanticRoles::Base
Instance Method Details
#reader(*args, &blk) ⇒ Object
Check if specified suspect have assigned given role. If don’t, then given block will be executed and true
returned.
133 134 135 136 137 |
# File 'lib/aclatraz/suspect.rb', line 133 def reader(*args, &blk) = has?(*args) blk.call if ! && block_given? ! end |
#writer(*args) ⇒ Object
Deletes given role from suspected object.
127 128 129 |
# File 'lib/aclatraz/suspect.rb', line 127 def writer(*args) delete(*args) end |