Class: Travis::Client::Listener::EntityListener
- Inherits:
- 
      Object
      
        - Object
- Travis::Client::Listener::EntityListener
 
- Extended by:
- Forwardable
- Defined in:
- lib/travis/client/listener.rb
Instance Attribute Summary collapse
- 
  
    
      #entities  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute entities. 
- 
  
    
      #listener  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute listener. 
Instance Method Summary collapse
- 
  
    
      #initialize(listener, entities)  ⇒ EntityListener 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of EntityListener. 
- #on(*events) ⇒ Object
Constructor Details
#initialize(listener, entities) ⇒ EntityListener
Returns a new instance of EntityListener.
| 52 53 54 | # File 'lib/travis/client/listener.rb', line 52 def initialize(listener, entities) @listener, @entities = listener, Array(entities) end | 
Instance Attribute Details
#entities ⇒ Object (readonly)
Returns the value of attribute entities.
| 47 48 49 | # File 'lib/travis/client/listener.rb', line 47 def entities @entities end | 
#listener ⇒ Object (readonly)
Returns the value of attribute listener.
| 47 48 49 | # File 'lib/travis/client/listener.rb', line 47 def listener @listener end | 
Instance Method Details
#on(*events) ⇒ Object
| 56 57 58 | # File 'lib/travis/client/listener.rb', line 56 def on(*events) listener.on(*events) { |e| yield(e) if dispatch?(e) } end |