lib/mobile_enhancements/configuration.rb in mobile-enhancements-0.0.1 vs lib/mobile_enhancements/configuration.rb in mobile-enhancements-0.0.2

- old
+ new

@@ -45,15 +45,28 @@ mobile.format.to_sym end end class Options + # force format to pass through + def format(*args) + method_missing("format", *args) + end + + def read_attribute(name) + (@properties ||= {})[name] + end + + def write_attribute(name, value) + (@properties ||= {})[name] = value + end + def method_missing(name, *args, &block) case args.size when 0 - (@properties ||= {})[name] + read_attribute(name) when 1 - (@properties ||= {})[name] = args.first + write_attribute(name, args.first) else super end end end \ No newline at end of file