Sha256: f41f1cef18da9dc69cc99580afdaf18a8555a0a1cf541311781e51b19aeca007

Contents?: true

Size: 432 Bytes

Versions: 13

Compression:

Stored size: 432 Bytes

Contents

module ObjectAttorney

  module Delegation

    def zuper_method(method_name, *args)
      self.superclass.send(method_name, *args) if self.superclass.respond_to?(method_name)
    end

    def delegate_properties(*properties, options)
      properties.each { |property| delegate_property(property, options) }
    end

    def delegate_property(property, options)
      delegate property, "#{property}=", options
    end

  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
object_attorney-2.6.12 lib/object_attorney/delegation.rb
object_attorney-2.6.11 lib/object_attorney/delegation.rb
object_attorney-2.6.10 lib/object_attorney/delegation.rb
object_attorney-2.6.9 lib/object_attorney/delegation.rb
object_attorney-2.6.1 lib/object_attorney/delegation.rb
object_attorney-2.6.0 lib/object_attorney/delegation.rb
object_attorney-2.5.9 lib/object_attorney/delegation.rb
object_attorney-2.5.7 lib/object_attorney/delegation.rb
object_attorney-2.5.6 lib/object_attorney/delegation.rb
object_attorney-2.5.5 lib/object_attorney/delegation.rb
object_attorney-2.5.4 lib/object_attorney/delegation.rb
object_attorney-2.5.3 lib/object_attorney/delegation.rb
object_attorney-2.5.2 lib/object_attorney/delegation.rb