Sha256: d8d48206ebb536dd32765549ae5f47214a74014474656f038094d88dfff88e9f
Contents?: true
Size: 496 Bytes
Versions: 6
Compression:
Stored size: 496 Bytes
Contents
module Cucumber def self.initializer(*attributes) Module.new do attr_reader(*attributes) private(*attributes) define_method(:initialize) do |*arguments| if attributes.size != arguments.size raise ArgumentError, "wrong number of arguments (#{arguments.size} for #{attributes.size})" end attributes.zip(arguments) do |attribute, argument| instance_variable_set("@#{attribute}", argument) end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems