rubyz 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/either.rb +9 -0
- metadata +52 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0077d04851b34ed18938d4387b9b2c59e27c856f
|
4
|
+
data.tar.gz: b4251d2e5263d63a3e2b548bbb1dda8341e41423
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7a3a8c250e94026b5f978aafc2f4a2a8151477dc3db83cb355f81d9b331539211d5f833e0f53c57399b2859df505893a5ea255be3b084d3f249b43fc06a6ae93
|
7
|
+
data.tar.gz: ad27f49042d53e826b4fa488bea295cb47279efbf54caa79ea771c82dae71f3cafcea23db9dd7fdb6fca2289147608920f4b028f313d256d02d4eb8aa3265637
|
data/lib/either.rb
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
class Either
|
2
|
+
attr_reader :left, :right
|
3
|
+
def initialize(left, right)
|
4
|
+
raise ArgumentError.new("Either a right or an left please, not both") if (right != :none and left != :none)
|
5
|
+
raise ArgumentError.new("Either a right or an left please, please give me one") if (right == :none and left == :none)
|
6
|
+
@right = right
|
7
|
+
@left = left
|
8
|
+
end
|
9
|
+
end
|
metadata
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rubyz
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jessica Kerr
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2013-09-09 00:00:00 Z
|
13
|
+
dependencies: []
|
14
|
+
|
15
|
+
description: You can do anything in Ruby!
|
16
|
+
email: jessitron@gmail.com
|
17
|
+
executables: []
|
18
|
+
|
19
|
+
extensions: []
|
20
|
+
|
21
|
+
extra_rdoc_files: []
|
22
|
+
|
23
|
+
files:
|
24
|
+
- lib/either.rb
|
25
|
+
homepage:
|
26
|
+
licenses:
|
27
|
+
- CC0
|
28
|
+
metadata: {}
|
29
|
+
|
30
|
+
post_install_message:
|
31
|
+
rdoc_options: []
|
32
|
+
|
33
|
+
require_paths:
|
34
|
+
- lib
|
35
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- &id001
|
38
|
+
- ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: "0"
|
41
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
43
|
+
- *id001
|
44
|
+
requirements: []
|
45
|
+
|
46
|
+
rubyforge_project:
|
47
|
+
rubygems_version: 2.0.7
|
48
|
+
signing_key:
|
49
|
+
specification_version: 4
|
50
|
+
summary: like scalaz, but in ruby!
|
51
|
+
test_files: []
|
52
|
+
|