okuramasafumi / alba

Alba is a JSON serializer for Ruby, JRuby and TruffleRuby.
https://okuramasafumi.github.io/alba/
MIT License
934 stars 43 forks source link

[Feat] Add custom type #333

Closed okuramasafumi closed 1 year ago

okuramasafumi commented 1 year ago

Custom type is useful to DRY conversion and validation logic.

codecov[bot] commented 1 year ago

Codecov Report

Merging #333 (da66b39) into main (e1cacc9) will increase coverage by 0.20%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #333      +/-   ##
==========================================
+ Coverage   99.05%   99.26%   +0.20%     
==========================================
  Files          13       14       +1     
  Lines         531      545      +14     
==========================================
+ Hits          526      541      +15     
+ Misses          5        4       -1     
Files Coverage Δ
lib/alba.rb 99.09% <100.00%> (+0.09%) :arrow_up:
lib/alba/resource.rb 99.61% <100.00%> (+<0.01%) :arrow_up:
lib/alba/type.rb 100.00% <100.00%> (ø)
lib/alba/typed_attribute.rb 100.00% <100.00%> (+2.94%) :arrow_up: