poser 1.0.2 → 1.0.3
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/poser/presenter.rb +12 -2
 - data/lib/poser/version.rb +1 -1
 - data/spec/poser/presenter_spec.rb +7 -0
 - metadata +2 -2
 
    
        data/lib/poser/presenter.rb
    CHANGED
    
    | 
         @@ -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 
     | 
    
         
            -
                   
     | 
| 
      
 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?( 
     | 
| 
      
 44 
     | 
    
         
            +
                  other.is_a?(__class__) && context == other.context && __getobj__ == other.__getobj__
         
     | 
| 
       35 
45 
     | 
    
         
             
                end
         
     | 
| 
       36 
46 
     | 
    
         | 
| 
       37 
47 
     | 
    
         
             
              end
         
     | 
    
        data/lib/poser/version.rb
    CHANGED
    
    
    
        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. 
     | 
| 
      
 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- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2012-04-10 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: rspec
         
     |