wells_fargo 0.3.0 → 0.3.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.
- data/lib/wells_fargo/element.rb +4 -11
- data/lib/wells_fargo/version.rb +1 -1
- metadata +4 -4
data/lib/wells_fargo/element.rb
CHANGED
@@ -13,7 +13,7 @@ module WellsFargo
|
|
13
13
|
def add_child name, attributes = {}, &block
|
14
14
|
|
15
15
|
child_class_name = NameMap[name.to_s]
|
16
|
-
child_class =
|
16
|
+
child_class = retrieve_element_class child_class_name
|
17
17
|
|
18
18
|
child = child_class.new(xml, attributes)
|
19
19
|
capture = proc do |x|
|
@@ -38,16 +38,9 @@ module WellsFargo
|
|
38
38
|
|
39
39
|
protected
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
top_class = eval("::#{class_name}") rescue false
|
45
|
-
raise 'pass to rescue clause' if top_class
|
46
|
-
rescue
|
47
|
-
Element.const_set(class_name, Class.new(Element))
|
48
|
-
klass = Element.const_get(class_name)
|
49
|
-
end
|
50
|
-
klass
|
41
|
+
# Implicitly define class as a simple element if it's missing
|
42
|
+
def retrieve_element_class name
|
43
|
+
eval "class WellsFargo::Element::#{WellsFargo.camelize name} < WellsFargo::Element; self; end;"
|
51
44
|
end
|
52
45
|
|
53
46
|
def method_missing method, *args, &block
|
data/lib/wells_fargo/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wells_fargo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 2
|
10
|
+
version: 0.3.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jack Danger Canty
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-03-
|
18
|
+
date: 2011-03-15 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|