Class: Tuersteher::MethodSpecification
- Inherits:
-
Object
- Object
- Tuersteher::MethodSpecification
- Defined in:
- lib/tuersteher.rb
Instance Method Summary collapse
- #grant?(path_or_model, method, login_ctx) ⇒ Boolean
-
#initialize(method, negation) ⇒ MethodSpecification
constructor
A new instance of MethodSpecification.
- #to_s ⇒ Object
Constructor Details
#initialize(method, negation) ⇒ MethodSpecification
Returns a new instance of MethodSpecification.
484 485 486 |
# File 'lib/tuersteher.rb', line 484 def initialize method, negation @method, @negation = method, negation end |
Instance Method Details
#grant?(path_or_model, method, login_ctx) ⇒ Boolean
488 489 490 491 492 |
# File 'lib/tuersteher.rb', line 488 def grant? path_or_model, method, login_ctx rc = @method==method rc = !rc if @negation rc end |
#to_s ⇒ Object
494 495 496 |
# File 'lib/tuersteher.rb', line 494 def to_s "#{@negation && 'not.'}method(:#{@method})" end |