lib/yao/mode.rb in yao-0.13.4 vs lib/yao/mode.rb in yao-0.14.0
- old
+ new
@@ -1,7 +1,9 @@
module Yao
module Mode
+ # @param blk [Proc]
+ # @return [String]
def read_only!(&blk)
raise unless block_given?
raise_on_write_org = Yao.config.raise_on_write
noop_on_write_org = Yao.config.noop_on_write
@@ -14,9 +16,11 @@
Yao.config.set :raise_on_write, raise_on_write_org
Yao.config.set :noop_on_write, noop_on_write_org
end
end
+ # @param blk [Proc]
+ # @return [String]
def read_only(&blk)
raise unless block_given?
noop_on_write_org = Yao.config.noop_on_write
raise_on_write_org = Yao.config.raise_on_write