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.
22 #ifndef Y2RubyComponent_h
23 #define Y2RubyComponent_h
29 * @short YaST2 Component: Ruby bindings
31 class Y2RubyComponent : public Y2Component
45 * The name of this component.
47 string name() const { return "ruby"; }
50 * Is called by the generic frontend when the session is finished.
52 void result( const YCPValue & result );
55 * Implements the Ruby:: functions.
57 // not yet, prototype the transparent bindings first
58 // YCPValue evaluate( const YCPValue & val );
61 * Try to import a given namespace. This method is used
62 * for transparent handling of namespaces (YCP modules)
64 * @param name_space the name of the required namespace
65 * @return on errors, NULL should be returned. The
66 * error reporting must be done by the component itself
67 * (typically using y2log). On success, the method
68 * should return a proper instance of the imported namespace
69 * ready to be used. The returned instance is still owned
70 * by the component, any other part of YaST will try to
71 * free it. Thus, it's possible to share the instance.
73 Y2Namespace *import (const char* name);
76 #endif // Y2RubyComponent_h