mores 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6a05f6aa6035150e1284633d30bbb3a0da3a96b5
4
- data.tar.gz: f04a463e4896ee94728c23f6441459bd170243a6
3
+ metadata.gz: c5089b814082c19b5b854619abce746c88ad10ad
4
+ data.tar.gz: bb17beb1e0a76a4adc8c5b0b89700ffb180eda9c
5
5
  SHA512:
6
- metadata.gz: 3203d0ab814d35b943ebabeb7c76daac713c60f2fbf73420490655651a9bff54f561c9bcdb627d013996112aef99bd5635ecd963b709eecbe9f7ae2408add332
7
- data.tar.gz: 947196ce46eabf9689decec1861f17fa54da0898b07fcec35d29cfa0bf302e2d0655c416e4634d337ac97202f5bc2515d7f7fa8d6f199ad75ddc263a22013893
6
+ metadata.gz: 84d922f91adfdab3a6794d4c786bebaca7b23677de08e24dd9a6355dfff4928f304b49cb553bcd39e49cf2c8110baadec9e956bfe1f72d54364038928b43b815
7
+ data.tar.gz: 97bfe43d78aab3a08c680bc78365fa644ccc94eb03fd78a4c65ce189f88579419b8cb54855f9bdd54ce6ebcc99d05145a1cb47e0e5b8059d7598dee7b1ed8942
data/README.md CHANGED
@@ -35,7 +35,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
35
35
 
36
36
  ## Contributing
37
37
 
38
- 1. Fork it ( https://github.com/[my-github-username]/mores/fork )
38
+ 1. Fork it ( https://github.com/michaeljpetter/mores/fork )
39
39
  2. Create your feature branch (`git checkout -b my-new-feature`)
40
40
  3. Commit your changes (`git commit -am 'Add some feature'`)
41
41
  4. Push to the branch (`git push origin my-new-feature`)
@@ -1,21 +1,19 @@
1
1
  module Mores
2
2
 
3
3
  class ImmutableStruct < ::Struct
4
- require_relative 'immutable_struct/flyweight'
5
- require_relative 'immutable_struct/strict'
6
-
7
- DEFAULT_OPTIONS = { flyweight: true }.freeze
4
+ %w[
5
+ flyweight
6
+ strict
7
+ ].each { |file| require_relative "immutable_struct/#{file}" }
8
8
 
9
9
  undef_method :[]=
10
10
 
11
- def self.new(*args, **options, &block)
12
- options = DEFAULT_OPTIONS.merge options
13
-
11
+ def self.new(*args, flyweight: true, strict: false, &block)
14
12
  super(*args, &block).tap do |klass|
15
13
  klass.instance_eval do
16
14
  members.each { |x| remove_method "#{x}=" }
17
- include Flyweight if options[:flyweight]
18
- include Strict if options[:strict]
15
+ include Flyweight if flyweight
16
+ include Strict if strict
19
17
  end
20
18
  end
21
19
  end
data/lib/mores/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mores
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  end
data/lib/mores.rb CHANGED
@@ -1,5 +1,7 @@
1
- require 'mores/version'
2
- require 'mores/block_initialize'
3
- require 'mores/linked_list'
4
- require 'mores/succession'
5
- require 'mores/immutable_struct'
1
+ %w[
2
+ version
3
+ block_initialize
4
+ linked_list
5
+ succession
6
+ immutable_struct
7
+ ].each { |file| require "mores/#{file}" }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mores
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Petter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-29 00:00:00.000000000 Z
11
+ date: 2017-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler