Module: Ripple::Associations::KeyDelegator

Defined in:
lib/ripple/associations/one_key_proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#key_delegateObject

Returns the value of attribute key_delegate.



43
44
45
# File 'lib/ripple/associations/one_key_proxy.rb', line 43

def key_delegate
  @key_delegate
end

Instance Method Details

#keyObject



49
50
51
# File 'lib/ripple/associations/one_key_proxy.rb', line 49

def key
  self === key_delegate ? super : key_delegate.key
end

#key=(value) ⇒ Object



53
54
55
# File 'lib/ripple/associations/one_key_proxy.rb', line 53

def key=(value)
  self === key_delegate ? super(value) : key_delegate.key = value
end