Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bump version to v0.7

  • Loading branch information...
commit 9de7feb1d7aa14448f6535560f1e726c4b5a1b81 1 parent 6fafc15
@pzol authored
Showing with 21 additions and 1 deletion.
  1. +20 −0 CHANGELOG.md
  2. +1 −1  lib/monadic/version.rb
View
20 CHANGELOG.md
@@ -1,5 +1,25 @@
# Changelog
+## v0.7
+**BREAKING CHANGES**
+
+Rename `Either#else` to `Either#or` to be consistent with `Maybe`
+Using `Either#else` will give you a deprecation warning for now, it will be removed in v1.0
+
+New `Validation#fill` method for validating filling Structs.
+
+ ExampleStruct = Struct.new(:a, :b)
+ module ExampleValidator
+ extend self
+ def a(params); Try { params[0] }.or 'a cannot be empty'; end
+ def b(params); Try { params[1] }.or 'b cannot be empty'; end
+ end
+
+ result = Validation.fill(ExampleStruct, [1, 2], ExampleValidator) == Sucess
+ example = result.fetch
+ example.a == 1
+ example.b == 2
+
## v0.6
Extend `Try` to also support lambdas.
View
2  lib/monadic/version.rb
@@ -1,3 +1,3 @@
module Monadic
- VERSION = "0.6.0"
+ VERSION = "0.7.0"
end
Please sign in to comment.
Something went wrong with that request. Please try again.