1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
10 | ruby language support (C) Novell Inc. |
11 \----------------------------------------------------------------------/
13 Author: Duncan Mac-Vicar <dmacvicar@suse.de>
15 This program is free software; you can redistribute it and/or
16 modify it under the terms of the GNU General Public License
17 as published by the Free Software Foundation; either version
18 2 of the License, or (at your option) any later version.
25 #include "Y2RubyComponent.h"
28 * @short Y2ComponentCreator that creates Ruby-from-YCP bindings.
30 * A Y2ComponentCreator is an object that can create components.
31 * It receives a component name and - if it knows how to create
32 * such a component - returns a newly created component of this
33 * type. Y2CCRuby can create components with the name "Ruby".
35 class Y2CCRuby : public Y2ComponentCreator
42 * Creates a Ruby component creator
44 Y2CCRuby() : Y2ComponentCreator( Y2ComponentBroker::BUILTIN ),
53 * Returns true, since the Ruby component is a YaST2 server.
55 bool isServerCreator() const { return true; };
58 * Creates a new Ruby component.
60 Y2Component *create( const char * name ) const
62 // create as many as requested, they all share the static YRuby anyway
63 if ( ! strcmp( name, "ruby") ) return new Y2RubyComponent();
68 * always returns the same component, deletes it finally
70 Y2Component *provideNamespace (const char *name);
74 #endif // ifndef _Y2CCRuby_h