jader 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -41,6 +41,12 @@ module Jader
41
41
  h = {:model => self.class.name.downcase}
42
42
  self.jade_attributes.each do |attr|
43
43
  h[attr] = self.send(attr)
44
+
45
+ ans = h[attr].class.ancestors
46
+ if h[attr].class.respond_to?(:jade_serializable) || ans.include?(Enumerable) || ans.include?(ActiveModel::Validations)
47
+ h[attr] = h[attr].to_jade
48
+ else
49
+ end
44
50
  end
45
51
  h
46
52
  end
@@ -62,7 +68,7 @@ end
62
68
 
63
69
  class Object
64
70
  # Serialize Object to Jade format. Invoke `self.to_jade` if instance responds to `to_jade`
65
- def to_ice
71
+ def to_jade
66
72
  if self.respond_to? :to_a
67
73
  self.to_a.to_jade
68
74
  else
@@ -1,3 +1,3 @@
1
1
  module Jader
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-09-18 00:00:00.000000000 Z
13
+ date: 2012-10-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: libv8