Method: Cobweb#method_missing
- Defined in:
- lib/cobweb.rb
#method_missing(method_sym, *arguments, &block) ⇒ Object
used for setting default options
22 23 24 25 26 27 28 29 |
# File 'lib/cobweb.rb', line 22 def method_missing(method_sym, *arguments, &block) if method_sym.to_s =~ /^default_(.*)_to$/ tag_name = method_sym.to_s.split("_")[1..-2].join("_").to_sym @options[tag_name] = arguments[0] unless @options.has_key?(tag_name) else super end end |