mores 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3ece1af062ec702368bd3dc4c9566a79aa509135
4
- data.tar.gz: 2e3ed10515d3c2994e284dcbe8216e9d8a7560c1
3
+ metadata.gz: 3c825f049765d83153bea198a9c80472ded666b2
4
+ data.tar.gz: bf64d654bb527c103d9ef26d1283a8724231acc6
5
5
  SHA512:
6
- metadata.gz: 88f5cdd6dd1e90e7369c44c933b6d4538409424fd7f67cdc0ac0724f31b5845ac19eefb91abf5a4938778ff72badf849b95d9900014bf58946a1b1d414a1c271
7
- data.tar.gz: b541a546588535ad5615533f06248d23dbd8c9ced7c27a41b796c3924b68b7775f67b6e9e7a015427cc54e882d02418ceffe73ad95e6a003dd1319c41eec286e
6
+ metadata.gz: 81c6a14bb8284528ccf33ba80cebe8bf4c7c35a496a63f79f30b7937b5009caa90dd0bdf3a782e24533f6195ac70ada06bc3a890da4693e8b51b64b400fa2cd2
7
+ data.tar.gz: 3037ddb8b32afbc6be8978930d3ea40155a3399f8a9046e0d6eb1ac7d18e1711c8a671086ebc5aabde2e80eacb7ee8baf8eeb6d4dff0bd8dec085c30cf8af9b5
@@ -0,0 +1,16 @@
1
+ module Mores
2
+
3
+ module BlockInitialize
4
+ def new(*args, &block)
5
+ case block_given? and block.arity
6
+ when 0
7
+ super(*args, &nil).tap { |x| x.instance_exec &block }
8
+ when 1
9
+ super(*args, &nil).tap &block
10
+ else
11
+ super
12
+ end
13
+ end
14
+ end
15
+
16
+ end
@@ -4,6 +4,7 @@ module Mores
4
4
 
5
5
  class Succession
6
6
  extend Forwardable
7
+ extend BlockInitialize
7
8
 
8
9
  def line(name, &default)
9
10
  singleton_class.delegate name => :'__list.head.value'
data/lib/mores/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mores
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
data/lib/mores.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  require 'mores/version'
2
+ require 'mores/block_initialize'
2
3
  require 'mores/linked_list'
3
4
  require 'mores/succession'
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.3
4
+ version: 0.1.4
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-10 00:00:00.000000000 Z
11
+ date: 2016-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -77,6 +77,7 @@ files:
77
77
  - LICENSE.txt
78
78
  - README.md
79
79
  - lib/mores.rb
80
+ - lib/mores/block_initialize.rb
80
81
  - lib/mores/linked_list.rb
81
82
  - lib/mores/succession.rb
82
83
  - lib/mores/version.rb