Class: Sequent::Generator::Event
- Inherits:
 - 
      Object
      
        
- Object
 - Sequent::Generator::Event
 
 
- Defined in:
 - lib/sequent/generator/event.rb
 
Instance Attribute Summary collapse
- 
  
    
      #attrs  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute attrs.
 - 
  
    
      #event  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute event.
 
Instance Method Summary collapse
- #execute ⇒ Object
 - 
  
    
      #initialize(name, event, attrs)  ⇒ Event 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Event.
 
Constructor Details
#initialize(name, event, attrs) ⇒ Event
Returns a new instance of Event.
      12 13 14 15 16  | 
    
      # File 'lib/sequent/generator/event.rb', line 12 def initialize(name, event, attrs) @name = name @event = event @attrs = attrs.map{|a| a.split(':')} end  | 
  
Instance Attribute Details
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
      10 11 12  | 
    
      # File 'lib/sequent/generator/event.rb', line 10 def attrs @attrs end  | 
  
#event ⇒ Object (readonly)
Returns the value of attribute event.
      10 11 12  | 
    
      # File 'lib/sequent/generator/event.rb', line 10 def event @event end  | 
  
Instance Method Details
#execute ⇒ Object
      18 19 20 21  | 
    
      # File 'lib/sequent/generator/event.rb', line 18 def execute ensure_existing_aggregate! add_event_to_aggregate end  |