microformat 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/microformat/attribute.rb +2 -2
- data/lib/microformat/version.rb +1 -1
- metadata +2 -2
@@ -30,9 +30,9 @@ module Microformat
|
|
30
30
|
def read_value_from(document)
|
31
31
|
Array(options[:attribute] || "text").each do |attr|
|
32
32
|
if attr == "text"
|
33
|
-
return cast(document.text || options[:default], options[:cast])
|
33
|
+
return cast((document && document.text) || options[:default], options[:cast])
|
34
34
|
elsif document[attr]
|
35
|
-
return cast(document[attr], options[:cast])
|
35
|
+
return cast(document && document[attr], options[:cast])
|
36
36
|
end
|
37
37
|
end
|
38
38
|
return options[:default]
|
data/lib/microformat/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: microformat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|