Sha256: 4243637b364f7f4a70763e35f85029f9b805780c06e3fd3bed9c9a4ba8e960c7

Contents?: true

Size: 424 Bytes

Versions: 2

Compression:

Stored size: 424 Bytes

Contents

module Doorman
  module Helpers
    def allow(*args, &blk)
      _capture_within_rule_context(:allow, args, &blk)
    end
    
    def deny(*args, &blk)
      _capture_within_rule_context(:deny, args, &blk)
    end        
    
    def _capture_within_rule_context(type, args, &blk)
      _check_rule(Doorman::Rule.from_hash(type, args.first)) ? blk.call  : ""
    end
    private :_capture_within_rule_context
  end  
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
jrun-rails_doorman-0.0.1 lib/rails_doorman/helpers.rb
rails-doorman-0.1.0 lib/doorman/helpers.rb