Module: Pod4::Param
Overview
This module implements the singleton pattern and is used internally to store parameters passed to it from outside of Pod4
Instance Method Summary collapse
Instance Method Details
#get(p) ⇒ Object
19 |
# File 'lib/pod4/param.rb', line 19 def get(p); params[p.to_s.to_sym]; end |
#get_all ⇒ Object
21 |
# File 'lib/pod4/param.rb', line 21 def get_all; Octothorpe.new(params.dup); end |
#params ⇒ Object
15 |
# File 'lib/pod4/param.rb', line 15 def params; @params ||= {}; end |
#reset ⇒ Object
23 |
# File 'lib/pod4/param.rb', line 23 def reset; @params = {}; end |
#set(p, v) ⇒ Object
17 |
# File 'lib/pod4/param.rb', line 17 def set(p,v); params[p.to_s.to_sym] = v; end |