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 +4 -4
- data/README.md +1 -1
- data/lib/mores/immutable_struct.rb +7 -9
- data/lib/mores/version.rb +1 -1
- data/lib/mores.rb +7 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5089b814082c19b5b854619abce746c88ad10ad
|
4
|
+
data.tar.gz: bb17beb1e0a76a4adc8c5b0b89700ffb180eda9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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/
|
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
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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,
|
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
|
18
|
-
include Strict if
|
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
data/lib/mores.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
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.
|
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:
|
11
|
+
date: 2017-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|