poser 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,8 +22,18 @@ module Poser
22
22
 
23
23
  attr_reader :context
24
24
 
25
+ alias_method :__class__, :class
26
+
27
+ def id
28
+ __getobj__.id
29
+ end
30
+
31
+ def class
32
+ __getobj__.class
33
+ end
34
+
25
35
  def present(object)
26
- self.class.present object, context
36
+ __class__.present object, context
27
37
  end
28
38
 
29
39
  def presented?
@@ -31,7 +41,7 @@ module Poser
31
41
  end
32
42
 
33
43
  def ==(other)
34
- other.is_a?(self.class) && context == other.context && __getobj__ == other.__getobj__
44
+ other.is_a?(__class__) && context == other.context && __getobj__ == other.__getobj__
35
45
  end
36
46
 
37
47
  end
@@ -1,3 +1,3 @@
1
1
  module Poser
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -68,5 +68,12 @@ describe Poser::Presenter do
68
68
  subject.present(object).should == result
69
69
  end
70
70
  end
71
+
72
+ describe "class" do
73
+ it "delegates to the presenter" do
74
+ @presentee.stub(:class) { String }
75
+ subject.class.should == String
76
+ end
77
+ end
71
78
  end
72
79
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
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-04-06 00:00:00.000000000 Z
12
+ date: 2012-04-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec