Class: Messaging::Adapters::Test::Stream
- Inherits:
- 
      Object
      
        - Object
- Messaging::Adapters::Test::Stream
 
- Defined in:
- lib/messaging/adapters/test/stream.rb
Instance Attribute Summary collapse
- 
  
    
      #name  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute name. 
Instance Method Summary collapse
- #current_position ⇒ Object
- 
  
    
      #initialize(name)  ⇒ Stream 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Stream. 
- #messages ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(name) ⇒ Stream
Returns a new instance of Stream.
| 7 8 9 | # File 'lib/messaging/adapters/test/stream.rb', line 7 def initialize(name) self.name = name end | 
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
| 5 6 7 | # File 'lib/messaging/adapters/test/stream.rb', line 5 def name @name end | 
Instance Method Details
#current_position ⇒ Object
| 19 20 21 | # File 'lib/messaging/adapters/test/stream.rb', line 19 def current_position .length - 1 end | 
#messages ⇒ Object
| 11 12 13 | # File 'lib/messaging/adapters/test/stream.rb', line 11 def @messages ||= [] end | 
#to_s ⇒ Object
| 15 16 17 | # File 'lib/messaging/adapters/test/stream.rb', line 15 def to_s name end |