Method: Undies::Element::CSSProxy#method_missing

Defined in:
lib/undies/element.rb

#method_missing(meth, *args, &block) ⇒ Object



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/undies/element.rb', line 47

def method_missing(meth, *args, &block)
  if meth.to_s =~ ID_METH_REGEX
    @attrs[:id] = $1
    proxy(args, block)
  elsif meth.to_s =~ CLASS_METH_REGEX
    @attrs[:class] = [@attrs[:class], $1].compact.join(' ')
    proxy(args, block)
  else
    super
  end
end