Skip to content
Browse files

Bump version to v0.7

  • Loading branch information...
1 parent 6fafc15 commit 9de7feb1d7aa14448f6535560f1e726c4b5a1b81 @pzol committed Jul 2, 2012
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

0 comments on commit 9de7feb

Please sign in to comment.
Something went wrong with that request. Please try again.