-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathruby.ts
40 lines (33 loc) · 1.74 KB
/
ruby.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import * as spec from 'jsii-spec';
import { Generator } from '../generator';
import { Target, TargetOptions } from '../target';
export default class Ruby extends Target {
protected readonly generator = new PackOnly();
constructor(options: TargetOptions) {
super(options);
}
public build(sourceDir: string, outDir: string) {
// TODO: "gem build"
return this.copyFiles(sourceDir, outDir);
}
}
// ##################
// # CODE GENERATOR #
// ##################
class PackOnly extends Generator {
protected getAssemblyOutputDir(_mod: spec.Assembly) {
return '.';
}
protected onBeginInterface(_ifc: spec.InterfaceType) { return; }
protected onEndInterface(_ifc: spec.InterfaceType) { return; }
protected onInterfaceMethod(_ifc: spec.InterfaceType, _method: spec.Method) { return; }
protected onInterfaceMethodOverload(_ifc: spec.InterfaceType, _overload: spec.Method, _originalMethod: spec.Method) { return; }
protected onInterfaceProperty(_ifc: spec.InterfaceType, _prop: spec.Property) { return; }
protected onProperty(_cls: spec.ClassType, _prop: spec.Property) { return; }
protected onStaticProperty(_cls: spec.ClassType, _prop: spec.Property) { return; }
protected onUnionProperty(_cls: spec.ClassType, _prop: spec.Property, _union: spec.UnionTypeReference) { return; }
protected onMethod(_cls: spec.ClassType, _method: spec.Method) { return; }
protected onMethodOverload(_cls: spec.ClassType, _overload: spec.Method, _originalMethod: spec.Method) { return; }
protected onStaticMethod(_cls: spec.ClassType, _method: spec.Method) { return; }
protected onStaticMethodOverload(_cls: spec.ClassType, _overload: spec.Method, _originalMethod: spec.Method) { return; }
}