ronad 0.7.0 → 0.8.0

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
- SHA1:
3
- metadata.gz: b5dcb8f23c03e79aa05ea674e652e6706b100a2e
4
- data.tar.gz: bb397e667d3d0aabd547b03144e07ab9bb613348
2
+ SHA256:
3
+ metadata.gz: c1c1d81e3ad943c14948fd34fdc398b803c448c539caae98c4185a6d755f0f1b
4
+ data.tar.gz: 92dab46b61f572cc282250c82a0ab773ced2ebe324a0afca5c62f583514aae09
5
5
  SHA512:
6
- metadata.gz: 545731ce0d8b81434fbe3480642f003c1e0f35386dd641e356fffea71138c104d1f4d54ad719f359b082d52ec7703854ea6a04a78b04e7c2de614e901ca81a40
7
- data.tar.gz: 7f9f56a92c6d853faf228f66a1b3ae3a4b926bc8990ea81b5c971d56ec9b084af94bdb47aa74e437e144fc054f8f2c8789d955e0aecec192e9cdc8d32601a990
6
+ metadata.gz: 0a2e89de7f169d6151ad8206c44b36092d30bbe307d1ec2b173cdb867039846b94e8799c55fc2f9e091151da4888630126be9a548a4285a59691baf70d5c52ed
7
+ data.tar.gz: bce45b736e66c1a22735af3d42582233104705d71f5ab376a18008850d0fa6eebc2a63c0317b9f581a3d6c11fefed5a459654f69945931b03519c2433e05f01c
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.4.2
1
+ 2.5.3
@@ -0,0 +1,7 @@
1
+ module Ronad
2
+ class JustOne < Just
3
+ def initialize(*args)
4
+ super args.detect { |v| Monad === v ? v.value : v }
5
+ end
6
+ end
7
+ end
data/lib/ronad/sugar.rb CHANGED
@@ -1,10 +1,12 @@
1
1
  require 'ronad/maybe'
2
2
  require 'ronad/just'
3
+ require 'ronad/just_one'
3
4
  require 'ronad/default'
4
5
  require 'ronad/eventually'
5
6
 
6
7
  def Maybe(value) ; Ronad::Maybe.new(value) end
7
8
  def Just(value); Ronad::Just.new(value) end
9
+ def JustOne(*values); Ronad::JustOne.new(*values) end
8
10
  def Default(fallback, value) ; Ronad::Default.new(fallback, value) end
9
11
  def Eventually(&b); Ronad::Eventually.new(b) end
10
12
 
data/lib/ronad/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ronad
2
- VERSION = '0.7.0'
2
+ VERSION = '0.8.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ronad
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Uri Gorelik
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-18 00:00:00.000000000 Z
11
+ date: 2018-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -100,6 +100,7 @@ files:
100
100
  - lib/ronad/default.rb
101
101
  - lib/ronad/eventually.rb
102
102
  - lib/ronad/just.rb
103
+ - lib/ronad/just_one.rb
103
104
  - lib/ronad/maybe.rb
104
105
  - lib/ronad/monad.rb
105
106
  - lib/ronad/sugar.rb
@@ -126,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
127
  version: '0'
127
128
  requirements: []
128
129
  rubyforge_project:
129
- rubygems_version: 2.6.13
130
+ rubygems_version: 2.7.6
130
131
  signing_key:
131
132
  specification_version: 4
132
133
  summary: Monads implemented the Ruby way