Sha256: b40054059505f739bdf051f46c842ac5308a64093a0ea09ae702c1daddf34ad8

Contents?: true

Size: 392 Bytes

Versions: 10

Compression:

Stored size: 392 Bytes

Contents

module ActiveFedora::Aggregation
  # This is an Adapter to allow a Decorator to respond to the interface #new()
  # but still require other arguments to instantiate.
  class DecoratorWithArguments
    attr_reader :decorator, :args
    def initialize(decorator, *args)
      @decorator = decorator
      @args = args
    end

    def new(obj)
      decorator.new(obj, *args)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
activefedora-aggregation-0.9.0 lib/active_fedora/aggregation/decorator_with_arguments.rb
activefedora-aggregation-0.8.1 lib/active_fedora/aggregation/decorator_with_arguments.rb
activefedora-aggregation-0.8.0 lib/active_fedora/aggregation/decorator_with_arguments.rb
activefedora-aggregation-0.7.0 lib/active_fedora/aggregation/decorator_with_arguments.rb
activefedora-aggregation-0.6.0 lib/active_fedora/aggregation/decorator_with_arguments.rb
activefedora-aggregation-0.5.0 lib/active_fedora/aggregation/decorator_with_arguments.rb
activefedora-aggregation-0.4.2 lib/active_fedora/aggregation/decorator_with_arguments.rb
activefedora-aggregation-0.4.1 lib/active_fedora/aggregation/decorator_with_arguments.rb
activefedora-aggregation-0.4.0 lib/active_fedora/aggregation/decorator_with_arguments.rb
activefedora-aggregation-0.3.0 lib/active_fedora/aggregation/decorator_with_arguments.rb