Module: Pod4::Param

Extended by:
Param
Included in:
Param
Defined in:
lib/pod4/param.rb

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_allObject



21
# File 'lib/pod4/param.rb', line 21

def get_all; Octothorpe.new(params.dup); end

#paramsObject



15
# File 'lib/pod4/param.rb', line 15

def params; @params ||= {}; end

#resetObject



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