123456789_123456789_123456789_123456789_123456789_

Class: ActiveSupport::Delegation::ClassDelegator

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, ::Delegator
Instance Chain:
Inherits: Delegator
Defined in: activesupport/lib/active_support/delegation.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(delegated_obj) ⇒ ClassDelegator

[ GitHub ]

  
# File 'activesupport/lib/active_support/delegation.rb', line 27

def initialize(delegated_obj)
  @delegate_dc_obj = delegated_obj
end

Instance Attribute Details

#__getobj__ (readonly)

Alias for #delegate_dc_obj.

[ GitHub ]

  
# File 'activesupport/lib/active_support/delegation.rb', line 24

alias_method :__getobj__, :delegate_dc_obj

#delegate_dc_obj (readonly) Also known as: #__getobj__

[ GitHub ]

  
# File 'activesupport/lib/active_support/delegation.rb', line 23

attr_reader :delegate_dc_obj

Instance Method Details

#__setobj__(obj)

[ GitHub ]

  
# File 'activesupport/lib/active_support/delegation.rb', line 31

def __setobj__(obj)
  __raise__ ::ArgumentError, "cannot delegate to self" if equal?(obj)
  @delegate_dc_obj = obj
end