rubigraph 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +6 -0
- data/lib/rubigraph.rb +5 -13
- metadata +2 -2
data/History.txt
CHANGED
data/lib/rubigraph.rb
CHANGED
@@ -7,7 +7,7 @@ require 'pp'
|
|
7
7
|
# Call Rubigraph.init at first.
|
8
8
|
#
|
9
9
|
module Rubigraph
|
10
|
-
VERSION = '0.0
|
10
|
+
VERSION = '0.1.0'
|
11
11
|
|
12
12
|
class Vertex
|
13
13
|
attr_reader :id
|
@@ -26,16 +26,12 @@ module Rubigraph
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def set_attribute(att, value)
|
29
|
-
|
30
|
-
raise "Rubigraph::Vertex##{att}=: cannot change #{att} #{@id}"
|
31
|
-
end
|
29
|
+
Rubigraph.server.call('ubigraph.set_vertex_attribute', @id, att, value.to_s)
|
32
30
|
end
|
33
31
|
|
34
32
|
def set_attributes(attrs)
|
35
33
|
attrs.each do |k, v|
|
36
|
-
|
37
|
-
raise "Rubigraph::Vertex##{k}=: cannot change #{v} #{@id}"
|
38
|
-
end
|
34
|
+
Rubigraph.server.call('ubigraph.set_vertex_attribute', @id, k, v.to_s)
|
39
35
|
end
|
40
36
|
end
|
41
37
|
|
@@ -102,16 +98,12 @@ module Rubigraph
|
|
102
98
|
end
|
103
99
|
|
104
100
|
def set_attribute(att, value)
|
105
|
-
|
106
|
-
raise "Rubigraph::edge##{att}=: cannot change #{att} #{@id}"
|
107
|
-
end
|
101
|
+
Rubigraph.server.call('ubigraph.set_edge_attribute', @id, att, value.to_s)
|
108
102
|
end
|
109
103
|
|
110
104
|
def set_attributes(attrs)
|
111
105
|
attrs.each do |k, v|
|
112
|
-
|
113
|
-
raise "Rubigraph::edge##{k}=: cannot change #{v} #{@id}"
|
114
|
-
end
|
106
|
+
Rubigraph.server.call('ubigraph.set_edge_attribute', @id, k, v.to_s)
|
115
107
|
end
|
116
108
|
end
|
117
109
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubigraph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mootoh
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-05-
|
12
|
+
date: 2008-05-29 00:00:00 +09:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|