ms-core 0.0.6 → 0.0.7
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/VERSION +1 -1
- data/lib/cv/cv.rb +3 -0
- data/lib/cv/description.rb +8 -0
- data/lib/cv/param.rb +17 -0
- metadata +5 -3
- data/lib/cv_param.rb +0 -16
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.7
|
data/lib/cv/cv.rb
ADDED
data/lib/cv/param.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
module Cv
|
3
|
+
class Param
|
4
|
+
attr_accessor :cv_ref, :accession, :name, :value
|
5
|
+
|
6
|
+
def initialize(cv_ref, accession, name, value=nil)
|
7
|
+
(@cv_ref, @accession, @name, @value) = [cv_ref, accession, name, value]
|
8
|
+
end
|
9
|
+
|
10
|
+
def to_xml(xml, name=:cvParam)
|
11
|
+
hash_to_send = {:cvRef => @cvref, :accession => @accession, :name => @name}
|
12
|
+
hash_to_send[:value] = @value if @value
|
13
|
+
xml.send(name, hash_to_send)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 7
|
9
|
+
version: 0.0.7
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Simon Chiang
|
@@ -60,7 +60,9 @@ files:
|
|
60
60
|
- README.rdoc
|
61
61
|
- Rakefile
|
62
62
|
- VERSION
|
63
|
-
- lib/
|
63
|
+
- lib/cv/cv.rb
|
64
|
+
- lib/cv/description.rb
|
65
|
+
- lib/cv/param.rb
|
64
66
|
- lib/ms.rb
|
65
67
|
- lib/ms/calc.rb
|
66
68
|
- lib/ms/data.rb
|
data/lib/cv_param.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
|
2
|
-
# Controlled vocabulary
|
3
|
-
class CvParam
|
4
|
-
attr_accessor :cv_ref, :accession, :name, :value
|
5
|
-
|
6
|
-
def initialize(cv_ref, accession, name, value=nil)
|
7
|
-
(@cv_ref, @accession, @name, @value) = [cv_ref, accession, name, value]
|
8
|
-
end
|
9
|
-
|
10
|
-
def to_xml(xml, name=:cvParam)
|
11
|
-
hash_to_send = {:cvRef => @cvref, :accession => @accession, :name => @name}
|
12
|
-
hash_to_send[:value] = @value if @value
|
13
|
-
xml.send(name, hash_to_send)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|