Top Level Namespace
Defined Under Namespace
Classes: Olsen
Instance Method Summary collapse
Instance Method Details
#O(key, params = nil) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/olsen.rb', line 4 def O( key, params=nil ) instance = Sadie::getCurrentSadieInstance if ! defined? instance puts "err: getCurrentSadieInstance returned nil" return nil end if defined? params if params.respond_to? "has_key?" if params.has_key? :filter filter = params[:filter] if filter.respond_to? "each" ret = Olsen::filter instance.get( key ), filter return ret else ret = Olsen::filter instance.get( key ), [filter] return ret end end end end instance.get( key ) end |