toss-ruby 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/toss-ruby/toss/toss.cpp +21 -0
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fea97bcdd75d56ae0819aa02d3cd81cbc9cbbf0
|
4
|
+
data.tar.gz: bd8c427fc75851a746ba9c009c57e3aba7ff5c5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d96f9d8899936b52a5fd4454891b1875cf9f19a5b497d1a2106cbe1235936b0dc162c48e6cc6ad5d3f34c81a960b22250967071695f4e56d3a8b561bb2016e4
|
7
|
+
data.tar.gz: 9e997a6832f12f0f0bdb02b50a307b0a862773883c6bfc014d64ec8d86ab0309680a61df05cd6cc0062b961821aca092c9618fb8877682482d82bb67e7552dcf
|
data/ext/toss-ruby/toss/toss.cpp
CHANGED
@@ -22,6 +22,16 @@ gen_parse_file(VALUE self, VALUE file)
|
|
22
22
|
return Qnil;
|
23
23
|
}
|
24
24
|
|
25
|
+
static VALUE
|
26
|
+
gen_parse_string(VALUE self, VALUE string)
|
27
|
+
{
|
28
|
+
toss::Generator* s;
|
29
|
+
|
30
|
+
Data_Get_Struct(self, toss::Generator, s);
|
31
|
+
s->parseString(StringValueCStr(string));
|
32
|
+
return Qnil;
|
33
|
+
}
|
34
|
+
|
25
35
|
static VALUE
|
26
36
|
gen_generate(VALUE self)
|
27
37
|
{
|
@@ -32,6 +42,15 @@ gen_generate(VALUE self)
|
|
32
42
|
return Qnil;
|
33
43
|
}
|
34
44
|
|
45
|
+
static VALUE
|
46
|
+
gen_generate_string(VALUE self)
|
47
|
+
{
|
48
|
+
toss::Generator* s;
|
49
|
+
|
50
|
+
Data_Get_Struct(self, toss::Generator, s);
|
51
|
+
return rb_str_new2(s->generateString().c_str());
|
52
|
+
}
|
53
|
+
|
35
54
|
void
|
36
55
|
Init_toss()
|
37
56
|
{
|
@@ -39,5 +58,7 @@ Init_toss()
|
|
39
58
|
cGenerator = rb_define_class_under(mToss, "Generator", rb_cObject);
|
40
59
|
rb_define_alloc_func(cGenerator, gen_new);
|
41
60
|
rb_define_method(cGenerator, "parse_file", (VALUE(*)(...))gen_parse_file, 1);
|
61
|
+
rb_define_method(cGenerator, "parse_string", (VALUE(*)(...))gen_parse_string, 1);
|
42
62
|
rb_define_method(cGenerator, "generate", (VALUE(*)(...))gen_generate, 0);
|
63
|
+
rb_define_method(cGenerator, "generate_string", (VALUE(*)(...))gen_generate_string, 0);
|
43
64
|
}
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toss-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nax
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '10.1'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '10.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake-compiler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '0.9'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '0.9'
|
41
41
|
description: Toss-ruby is a ruby binding of the toss library.
|
42
42
|
email: max.bacoux@gmail.com
|
43
43
|
executables: []
|