yaml-model 1.3.3 → 1.3.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -155,6 +155,10 @@ class YAML_Model
155
155
  "#{self.class.name}[#{id}]"
156
156
  end
157
157
 
158
+ def self.inspect
159
+ all.map{|a|a.inspect}.join("\n")
160
+ end
161
+
158
162
  def inspect
159
163
  keys = self.class.attributes.keys.sort
160
164
  keys.delete( :id )
@@ -1,3 +1,3 @@
1
1
  class YAML_Model
2
- VERSION = "1.3.3"
2
+ VERSION = "1.3.4"
3
3
  end
@@ -19,7 +19,12 @@ describe YAML_Model, ".to_s" do
19
19
  next_oid = YAML_Model.next_oid
20
20
  ref = InspectedModelReference.create
21
21
  at = Time.now
22
- InspectedModel.create( 'foo', at, ref ).inspect.should == "InspectedModel[#{next_oid+1}]{:at=>#{at.inspect},:name=>\"foo\",:reference=>InspectedModelReference[#{next_oid}]{}}"
22
+ model_1 = InspectedModel.create( 'foo', at, ref )
23
+ model_1.inspect.should == "InspectedModel[#{next_oid+1}]{:at=>#{at.inspect},:name=>\"foo\",:reference=>InspectedModelReference[#{next_oid}]{}}"
24
+ model_2 = InspectedModel.create( 'bar', at, ref )
25
+ model_2.inspect.should == "InspectedModel[#{next_oid+2}]{:at=>#{at.inspect},:name=>\"bar\",:reference=>InspectedModelReference[#{next_oid}]{}}"
26
+ InspectedModelReference.inspect.should == ref.inspect
27
+ InspectedModel.inspect.should == "#{model_1.inspect}\n#{model_2.inspect}"
23
28
  end
24
29
 
25
30
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 3
8
- - 3
9
- version: 1.3.3
8
+ - 4
9
+ version: 1.3.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Clive Crous
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-02-16 00:00:00 +02:00
17
+ date: 2011-02-20 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -99,7 +99,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - ">="
101
101
  - !ruby/object:Gem::Version
102
- hash: 491835281
102
+ hash: 788241761
103
103
  segments:
104
104
  - 0
105
105
  version: "0"
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - ">="
110
110
  - !ruby/object:Gem::Version
111
- hash: 491835281
111
+ hash: 788241761
112
112
  segments:
113
113
  - 0
114
114
  version: "0"