Class: ConvenientService::Utils::Object::DuckClass
- Inherits:
 - 
      Support::Command
      
        
- Object
 - Support::Command
 - ConvenientService::Utils::Object::DuckClass
 
 
- Defined in:
 - lib/convenient_service/utils/object/duck_class.rb
 
Overview
TODO: A better name.
Instance Attribute Summary collapse
- 
  
    
      #object  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute object.
 
Instance Method Summary collapse
- #call ⇒ Class
 - 
  
    
      #initialize(object)  ⇒ DuckClass 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of DuckClass.
 
Methods inherited from Support::Command
Constructor Details
#initialize(object) ⇒ DuckClass
Returns a new instance of DuckClass.
      104 105 106  | 
    
      # File 'lib/convenient_service/utils/object/duck_class.rb', line 104 def initialize(object) @object = object end  | 
  
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
      99 100 101  | 
    
      # File 'lib/convenient_service/utils/object/duck_class.rb', line 99 def object @object end  | 
  
Instance Method Details
#call ⇒ Class
      111 112 113  | 
    
      # File 'lib/convenient_service/utils/object/duck_class.rb', line 111 def call object.is_a?(::Module) ? object.singleton_class : object.class end  |