Sha256: 17a7bd4bdbb6f589c36c7738694703e60ad87b1338f6db14aa9a53f350defbd1

Contents?: true

Size: 238 Bytes

Versions: 7

Compression:

Stored size: 238 Bytes

Contents

require 'ns-options/proxy'

module NsOptions::Struct

  def self.new(opts=nil, &block)
    Class.new.tap do |klass|
      klass.class_eval { include NsOptions::Proxy }
      klass.define(&block)
      klass.apply(opts)
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ns-options-1.1.6 lib/ns-options/struct.rb
ns-options-1.1.5 lib/ns-options/struct.rb
ns-options-1.1.4 lib/ns-options/struct.rb
ns-options-1.1.3 lib/ns-options/struct.rb
ns-options-1.1.2 lib/ns-options/struct.rb
ns-options-1.1.1 lib/ns-options/struct.rb
ns-options-1.1.0 lib/ns-options/struct.rb