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.
486 487 488 |
# File 'lib/tuersteher.rb', line 486 def initialize method, negation @method, @negation = method, negation end |
Instance Method Details
#grant?(path_or_model, method, login_ctx) ⇒ Boolean
490 491 492 493 494 |
# File 'lib/tuersteher.rb', line 490 def grant? path_or_model, method, login_ctx rc = @method==method rc = !rc if @negation rc end |
#to_s ⇒ Object
496 497 498 |
# File 'lib/tuersteher.rb', line 496 def to_s "#{@negation && 'not.'}method(:#{@method})" end |