Exemple #1
0
        public RubyConstructor(RubyGlobalScope /*!*/ scope, NodeProvider /*!*/ nodeProvider)
            : base(nodeProvider, scope)
        {
            _encoding = RubyEncoding.GetRubyEncoding(nodeProvider.Encoding);

            _newSite = CallSite <Func <CallSite, RubyModule, object, object, object, object> > .Create(
                RubyCallAction.Make(scope.Context, "new", RubyCallSignature.WithImplicitSelf(3))
                );

            _yamlInitializeSite = CallSite <Func <CallSite, object, object, Hash, object> > .Create(
                RubyCallAction.Make(scope.Context, "yaml_initialize", RubyCallSignature.WithImplicitSelf(3))
                );
        }
        public RubyConstructor(RubyScope /*!*/ scope, NodeProvider /*!*/ nodeProvider)
            : base(nodeProvider, scope)
        {
            AddConstructor("tag:yaml.org,2002:str", ConstructRubyScalar);
            AddConstructor("tag:ruby.yaml.org,2002:range", ConstructRubyRange);
            AddConstructor("tag:ruby.yaml.org,2002:regexp", ConstructRubyRegexp);
            AddMultiConstructor("tag:ruby.yaml.org,2002:object:", ConstructPrivateObject);
            AddMultiConstructor("tag:ruby.yaml.org,2002:struct:", ConstructRubyStruct);
            AddConstructor("tag:yaml.org,2002:binary", ConstructRubyBinary);
            AddConstructor("tag:yaml.org,2002:timestamp#ymd", ConstructRubyTimestampYMD);

            //AddConstructor("tag:yaml.org,2002:omap", ConstructRubyOmap);
            //AddMultiConstructor("tag:yaml.org,2002:seq:", ConstructSpecializedRubySequence);
            //AddMultiConstructor("tag:yaml.org,2002:map:", ConstructSpecializedRubyMap);
        }
Exemple #3
0
 public BaseConstructor(NodeProvider /*!*/ nodeProvider, RubyGlobalScope /*!*/ globalScope)
 {
     Assert.NotNull(nodeProvider, globalScope);
     _nodeProvider = nodeProvider;
     _globalScope  = globalScope;
 }
Exemple #4
0
 public Constructor(NodeProvider /*!*/ nodeProvider, RubyScope /*!*/ scope)
     : base(nodeProvider, scope)
 {
 }
Exemple #5
0
 public BaseConstructor(NodeProvider /*!*/ nodeProvider, RubyScope /*!*/ scope)
 {
     Assert.NotNull(nodeProvider, scope);
     _nodeProvider = nodeProvider;
     _scope        = scope;
 }
Exemple #6
0
 public SafeConstructor(/*!*/ NodeProvider nodeProvider, RubyScope /*!*/ scope)
     : base(nodeProvider, scope)
 {
 }