diff options
Diffstat (limited to 'lib/metropolis/common.rb')
-rw-r--r-- | lib/metropolis/common.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/metropolis/common.rb b/lib/metropolis/common.rb index 13a02d8..2a3b841 100644 --- a/lib/metropolis/common.rb +++ b/lib/metropolis/common.rb @@ -9,6 +9,10 @@ module Metropolis::Common @headers.merge!(opts[:response_headers] || {}) @nr_slots = opts[:nr_slots] || 3 @readonly = !!opts[:readonly] + @exclusive = !!opts[:exclusive] + if @readonly && @exclusive + raise ArgumentError, ":readonly and :exclusive may not be used together" + end end def r(code, body = nil) |