adf 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/lib/adf.rb +12 -10
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 54c14ae472f8ae86d4591ae482ab10c4ddec0be9
|
|
4
|
+
data.tar.gz: deb09292652d21dd85ea89245a87c6888a2205db
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 86bb2ea2e7c8599c8b5af6a126f444d4ed03bb8828c378570f840bc86245d98a65f911615a638e834193e660e96a6afc8378388b252942038341a728b6a2e4c1
|
|
7
|
+
data.tar.gz: c8130ce00f96aa23e36ca684391c582800703dcc3937584004bd3cfe5bff31315aa4ec7835036743779c0fbf6d97998a1af9ba3203e6beb407127556ee4c32aa
|
data/lib/adf.rb
CHANGED
|
@@ -47,21 +47,23 @@ module ADF
|
|
|
47
47
|
xml = Builder::XmlMarkup.new( :indent => 2 )
|
|
48
48
|
xml.instruct! :xml, :encoding => "UTF-8"
|
|
49
49
|
xml.instruct! :adf, :version => "1.0"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
customer
|
|
55
|
-
contact
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
xml.adf do |adf|
|
|
51
|
+
@prospects.each do |prospect|
|
|
52
|
+
xml.prospect do |p|
|
|
53
|
+
p.request_date prospect.request_date
|
|
54
|
+
p.customer do |customer|
|
|
55
|
+
customer.contact do |contact|
|
|
56
|
+
contact.name(prospect.customer_first, "part" => "first") if not prospect.customer_first.nil?
|
|
57
|
+
contact.name(prospect.customer_last, "part" => "last") if not prospect.customer_last.nil?
|
|
58
|
+
contact.phone(prospect.customer_phone) if not prospect.customer_phone.nil?
|
|
59
|
+
contact.email(prospect.customer_email) if not prospect.customer_email.nil?
|
|
60
|
+
end
|
|
59
61
|
end
|
|
60
62
|
end
|
|
61
63
|
end
|
|
62
64
|
end
|
|
63
65
|
|
|
64
|
-
return xml
|
|
66
|
+
return xml.target!
|
|
65
67
|
end
|
|
66
68
|
end
|
|
67
69
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: adf
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alagu
|
|
@@ -19,7 +19,7 @@ extra_rdoc_files: []
|
|
|
19
19
|
files:
|
|
20
20
|
- lib/adf.rb
|
|
21
21
|
- lib/prospect.rb
|
|
22
|
-
homepage: http://
|
|
22
|
+
homepage: http://github.com/alagu/adf
|
|
23
23
|
licenses:
|
|
24
24
|
- MIT
|
|
25
25
|
metadata: {}
|