xml-kit 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xml/kit.rb +1 -0
- data/lib/xml/kit/template.rb +7 -4
- data/lib/xml/kit/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 925e83f414bc42a59834de793c7a37d174ebb0a787524c2188701f6851150a79
|
4
|
+
data.tar.gz: 4b1fd806847050b19df10455f3fd21cffa6835c6298b160ef56aa00acd90a879
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7426c0584ed0487fed5012a7ed794c3b22de1841af005224c4286feb6f8fa78117f3ae5fa1570d93479c867254aa9ce3c6ae26e44d821bfc08286020e1e1cc0
|
7
|
+
data.tar.gz: 952246a69a2ac54a07075fa72f9c8b3769a1cb73fe5dceb60c0c7f50a22fbc1ed2a93d5c6e1afff2a4af9388b597f1a2d95de08ed604c2a1b5dc58685b935767
|
data/lib/xml/kit.rb
CHANGED
data/lib/xml/kit/template.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
module Xml
|
2
2
|
module Kit
|
3
3
|
class Template
|
4
|
+
TEMPLATES_DIR=Pathname.new(File.join(__dir__, "templates/" ))
|
5
|
+
|
4
6
|
attr_reader :target
|
5
7
|
|
6
8
|
def initialize(target)
|
@@ -18,14 +20,15 @@ module Xml
|
|
18
20
|
|
19
21
|
def template_path
|
20
22
|
return target.template_path if target.respond_to?(:template_path)
|
23
|
+
TEMPLATES_DIR.join(template_name)
|
24
|
+
end
|
21
25
|
|
22
|
-
|
23
|
-
|
24
|
-
File.join(root_path, "templates/", template_name)
|
26
|
+
def template_name
|
27
|
+
"#{target.class.name.split("::").last.underscore}.builder"
|
25
28
|
end
|
26
29
|
|
27
30
|
def template
|
28
|
-
Tilt.new(template_path)
|
31
|
+
@template ||= Tilt.new(template_path.to_s)
|
29
32
|
end
|
30
33
|
end
|
31
34
|
end
|
data/lib/xml/kit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xml-kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mo khan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
214
|
version: '0'
|
215
215
|
requirements: []
|
216
216
|
rubyforge_project:
|
217
|
-
rubygems_version: 2.7.
|
217
|
+
rubygems_version: 2.7.3
|
218
218
|
signing_key:
|
219
219
|
specification_version: 4
|
220
220
|
summary: A simple toolkit for working with XML.
|