Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit fba761e

Browse files
committedSep 11, 2017
Bump v2.1.0
1 parent 4306bc9 commit fba761e

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed
 

‎CHANGELOG.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,31 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8-
## [2.0.0] To be released ASAP
8+
## [2.1.0] [2017-09-11]
9+
10+
### Added
11+
- Method `#options` to param/option definition (nepalez)
12+
13+
```ruby
14+
class User
15+
extend Dry::Initializer
16+
option :name, proc(&:to_s), optional: true
17+
option :email, optional: true
18+
end
19+
20+
User.dry_initializer.options.map do |option|
21+
[option.source, option.options]
22+
end
23+
# => [
24+
# [:name, { type: proc(&:to_s), as: :name, optional: true }],
25+
# [:email, { as: :email, optional: true }]
26+
# ]
27+
```
28+
29+
This method can be helpful for replicating params/options
30+
in another class without inheritance.
31+
32+
## [2.0.0] [2017-08-28]
933

1034
The gem has been rewritten under the hood keeping its documented
1135
interface about the same (see "Deleted" section below for the only

‎dry-initializer.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |gem|
22
gem.name = "dry-initializer"
3-
gem.version = "2.0.0"
3+
gem.version = "2.1.0"
44
gem.author = ["Vladimir Kochnev (marshall-lee)", "Andrew Kozin (nepalez)"]
55
gem.email = "andrew.kozin@gmail.com"
66
gem.homepage = "https://github.com/dryrb/dry-initializer"

0 commit comments

Comments
 (0)
Please sign in to comment.