Class: Dynflow::Serializable
  
  
  
  
  
    - Inherits:
 
    - 
      Object
      
        
          - Object
 
          
            - Dynflow::Serializable
 
          
        
        show all
      
     
  
  
  
  
  
  
  
  
  
  
    - Defined in:
 
    - lib/dynflow/serializable.rb
 
  
  
 
  
    
      Constant Summary
      collapse
    
    
      
        - TIME_FORMAT =
          
        
 
        '%Y-%m-%d %H:%M:%S.%L'
 
      
        - LEGACY_TIME_FORMAT =
          
        
 
        '%Y-%m-%d %H:%M:%S'
 
      
    
  
  
    
      Class Method Summary
      collapse
    
    
  
    
      Instance Method Summary
      collapse
    
    
  
  
    Class Method Details
    
      
  
  
    .constantize(action_name)  ⇒ Object 
  
  
  
  
    
      
35
36
37 
     | 
    
      # File 'lib/dynflow/serializable.rb', line 35
def self.constantize(action_name)
  Utils.constantize(action_name)
end 
     | 
  
 
    
      
  
  
    .from_hash(hash, *args)  ⇒ Object 
  
  
  
  
    
      
9
10
11
12 
     | 
    
      # File 'lib/dynflow/serializable.rb', line 9
def self.from_hash(hash, *args)
  check_class_key_present hash
  constantize(hash[:class]).new_from_hash(hash, *args)
end 
     | 
  
 
    
      
  
  
    .new_from_hash(hash, *args)  ⇒ Object 
  
  
  
  
    
  This method is part of a private API.
  You should avoid using this method if possible, as it may be removed or be changed in the future.
   
 
  
    
      
19
20
21
22 
     | 
    
      # File 'lib/dynflow/serializable.rb', line 19
def self.new_from_hash(hash, *args)
  raise NotImplementedError
  end 
     | 
  
 
    
   
  
    Instance Method Details
    
      
  
  
    #to_hash  ⇒ Object 
  
  
  
  
    
      
14
15
16 
     | 
    
      # File 'lib/dynflow/serializable.rb', line 14
def to_hash
  raise NotImplementedError
end 
     |