lib/playmo/options.rb in playmo-0.1.6 vs lib/playmo/options.rb in playmo-0.1.7
- old
+ new
@@ -4,9 +4,11 @@
class Options
include Singleton
attr_accessor :options_hash
def set(key, value)
+ raise ArgumentError, "Cannot set key as nil!" if key.nil?
+
@options_hash ||= {}
@options_hash[key.to_sym] = value
end
def get(key)
\ No newline at end of file