Method: React::Component::ClassMethods#method_missing
- Defined in:
- lib/react/component/class_methods.rb
#method_missing(name, *args, &children) ⇒ Object
method missing will assume the method is a class name, and will treat this a render of of the component, i.e. Foo::Bar.baz === Foo::Bar().baz
38 39 40 41 42 43 |
# File 'lib/react/component/class_methods.rb', line 38 def method_missing(name, *args, &children) Object.method_missing(name, *args, &children) unless args.empty? React::RenderingContext.render( self, class: React::Element.haml_class_name(name), &children ) end |