Sha256: 9c6520d723321e0bc402dd6f6bf08d6f16d6b45f6b45c32e62576edc71e7f734

Contents?: true

Size: 227 Bytes

Versions: 8

Compression:

Stored size: 227 Bytes

Contents

module Dependor
  def self.Constructor(*names)
    eval <<-RUBY

    Module.new do
      def initialize(#{names.join(', ')})
        #{names.map{ |name| "@#{name} = #{name}" }.join("\n") }
      end
    end

    RUBY
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dependor-1.0.1 lib/dependor/constructor.rb
dependor-1.0.0 lib/dependor/constructor.rb
dependor-0.0.6 lib/dependor/constructor.rb
dependor-0.0.5 lib/dependor/constructor.rb
dependor-0.0.4 lib/dependor/constructor.rb
dependor-0.0.3 lib/dependor/constructor.rb
dependor-0.0.2 lib/dependor/constructor.rb
dependor-0.0.1 lib/dependor/constructor.rb