easy_monads 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -0,0 +1,26 @@
1
+ # Easy Monads - Monads for Ruby, with Option
2
+
3
+ ## EasyMonads::Monadic
4
+
5
+ Created to provide an easy implementation of monads for Ruby. Monads are practical and easy to grok (or at least they should be). Here is an excellent tutorial that explains some of the benefits of monads: [monads-are-not-metaphors](http://www.codecommit.com/blog/ruby/monads-are-not-metaphors).
6
+
7
+ ## EasyMonads::Option
8
+
9
+ Inspiration for easy_monads largely comes from Scala's Option, and Option is implemented here. The goal of EasyMonad::Option isn't to mirror Scala's implementation, but it tries to follow the general pattern. If you are a Scala fan and are looking for Scala semantics in Ruby applications, you should have a look at [rumonade](https://github.com/ms-ati/rumonade) in addition to easy_monads. If you are just looking for an implentation of Option for Ruby, EasyMonads::Option is an easy choice.
10
+
11
+ To add Option to the Object class:
12
+
13
+ ```ruby
14
+ require 'easy_monads'
15
+ EasyMonads.option_everywhere!
16
+ ```
17
+
18
+ # Credits
19
+
20
+ Easy Monads is maintained by [Stephen Sloan](https://github.com/SteveSJ76) and is funded by [BookRenter.com](http://www.bookrenter.com "BookRenter.com"). We are experimenting with monads at BookRenter and hope that you find this useful.
21
+
22
+ ![BookRenter.com Logo](http://assets0.bookrenter.com/images/header/bookrenter_logo.gif "BookRenter.com")
23
+
24
+ # Copyright
25
+
26
+ Copyright (c) 2011 Stephen Sloan, Bookrenter.com. See LICENSE.txt for further details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.4.0
data/easy_monads.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "easy_monads"
8
- s.version = "0.3.0"
8
+ s.version = "0.4.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Stephen Sloan"]
12
- s.date = "2011-12-06"
12
+ s.date = "2012-01-23"
13
13
  s.description = "EasyMonads is a gem for Ruby that provides a simple implementation of monads. It also provides a useful example of\nmonads in the form of Option (similar to Scala's Option) which provides Some and None classes.\n\nDevelopement for EasyMonads is sponsored by BookRenter.com and it is released under an MIT-style license\n"
14
14
  s.email = "stephen.sloan@bookrenter.com"
15
15
  s.extra_rdoc_files = [
data/lib/easy_monads.rb CHANGED
@@ -1,10 +1,10 @@
1
1
  require File.join(File.dirname(__FILE__), "easy_monads", "monadic")
2
+ require File.join(File.dirname(__FILE__), "easy_monads", "option")
3
+ require File.join(File.dirname(__FILE__), "easy_monads", "option_functions")
2
4
 
3
5
  module EasyMonads
4
6
 
5
7
  def self.option_everywhere!
6
- require File.join(File.dirname(__FILE__), "easy_monads", "option")
7
- require File.join(File.dirname(__FILE__), "easy_monads", "option_functions")
8
8
  Object.class_eval("include EasyMonads::Option")
9
9
  end
10
10
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_monads
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 3
8
+ - 4
9
9
  - 0
10
- version: 0.3.0
10
+ version: 0.4.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Stephen Sloan
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-12-06 00:00:00 Z
18
+ date: 2012-01-23 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  requirement: &id001 !ruby/object:Gem::Requirement