extreml 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/extreml/type_element.rb +3 -3
- data/lib/extreml/xml_header.rb +24 -0
- data/lib/extreml.rb +4 -4
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4c04d21fd9340c2eaf8efe25d2e3d22019b7b32cc5ee321de0568c213e8717c
|
4
|
+
data.tar.gz: 1d451afb412c3bb2391abdc8a091072b11589b75c30b68ca91b9b20eb3f46d27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3528be356a982de9cbf91c89838fb3f7cf9cbc69bf5fd305558137b5a8a9961e9d08ff1dfacd34c9f02cd3fdc8a759eba6e1228f96fa0e19d419de3c614abfd3
|
7
|
+
data.tar.gz: b29351d86e590dfddbff3811e876c34ca37c5aa15b50c8cf6a83c6dbccfd3e1789ad1585333f7a03eacd50d8c6b91d15758dbec0abf3ffd5b227bd6e5b7bb947
|
data/lib/extreml/type_element.rb
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
require 'pp'
|
24
24
|
|
25
|
-
class TypeElement
|
25
|
+
class Extreml::TypeElement
|
26
26
|
|
27
27
|
def initialize document
|
28
28
|
|
@@ -101,12 +101,12 @@ class TypeElement
|
|
101
101
|
if self.__types.any? name.to_sym
|
102
102
|
array = self.send name.to_sym
|
103
103
|
define_singleton_method name.to_sym do
|
104
|
-
return [array].flatten + [(content.class == Hash ? (TypeElement.new content) : content)]
|
104
|
+
return [array].flatten + [(content.class == Hash ? (Extreml::TypeElement.new content) : content)]
|
105
105
|
end
|
106
106
|
else
|
107
107
|
define_singleton_method name.to_sym do
|
108
108
|
if content.class == Hash
|
109
|
-
return TypeElement.new content
|
109
|
+
return Extreml::TypeElement.new content
|
110
110
|
else
|
111
111
|
return content
|
112
112
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# MIT License
|
2
|
+
#
|
3
|
+
# Copyright (c) 2020 Fabio Boccacini - fboccacini@gmail.com
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
10
|
+
# furnished to do so, subject to the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
13
|
+
# copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
# SOFTWARE.
|
22
|
+
|
23
|
+
class Extreml::XmlHeader
|
24
|
+
end
|
data/lib/extreml.rb
CHANGED
@@ -20,10 +20,6 @@
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
21
|
# SOFTWARE.
|
22
22
|
|
23
|
-
require 'extreml/type_element'
|
24
|
-
|
25
|
-
class XmlHeader
|
26
|
-
end
|
27
23
|
|
28
24
|
class Extreml
|
29
25
|
|
@@ -151,3 +147,7 @@ class Extreml
|
|
151
147
|
end
|
152
148
|
|
153
149
|
end
|
150
|
+
|
151
|
+
|
152
|
+
require 'extreml/type_element'
|
153
|
+
require 'extreml/xml_header'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: extreml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabio Boccacini
|
@@ -20,6 +20,7 @@ extra_rdoc_files: []
|
|
20
20
|
files:
|
21
21
|
- lib/extreml.rb
|
22
22
|
- lib/extreml/type_element.rb
|
23
|
+
- lib/extreml/xml_header.rb
|
23
24
|
homepage: https://github.com/fboccacini/extreml
|
24
25
|
licenses:
|
25
26
|
- MIT
|