Sha256: e3ad038bc7434a8e89912c018c623b82b2ed70b0de811ea167d779530fb57e01
Contents?: true
Size: 564 Bytes
Versions: 12
Compression:
Stored size: 564 Bytes
Contents
module CoffeeTable module Utility # used for setting default options 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 def underscore(text) text.gsub(/::/, '/'). gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). gsub(/([a-z\d])([A-Z])/,'\1_\2'). tr("-", "_"). downcase end end end
Version data entries
12 entries across 12 versions & 1 rubygems