Method: Consul::Guard#initialize
- Defined in:
- lib/consul/guard.rb
#initialize(*args) ⇒ Guard
Returns a new instance of Guard.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/consul/guard.rb', line 49 def initialize(*args) args_copy = args.dup = args_copy. default_power = args_copy.shift # might be nil custom_action_mappings = [:map] if [:crud] @map = ActionMap.crud([:crud], custom_action_mappings) else @map = ActionMap.new(default_power, custom_action_mappings) end end |