module Lebowski::Foundation::Mixins::DelegateSupport

Public Instance Methods

get_delegate_property(key, *delegates) click to toggle source
# File lib/lebowski/foundation/mixins/delegate_support.rb, line 12
def get_delegate_property(key, *delegates)
  val = self[key]
  return val if (not val.nil?)
  return nil if (delegates.length == 0)
  delegates.each do |del|
    val = self["#{del}.#{key}"]
    return val if (val != :undefined and not val.nil?)
  end
  return nil
end