ree_lib 1.0.121 → 1.0.122

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 381666058a003165d365519531e3341ecc42c2b4756be1152651914bdd4f0419
4
- data.tar.gz: 9e1648ebd630847fbbe7acd75bac9e5c876cfeb8cfcb065d80a85ac798442eb7
3
+ metadata.gz: '03921ccbd7050911caf9c2ff781b825b5b0c68e3ac461c0ca03b5a857aa32be9'
4
+ data.tar.gz: fe55c4f54db004e5603a198293b23feaef1538541b034137943d0dd990ebec39
5
5
  SHA512:
6
- metadata.gz: 3138793f0e16c9e8dbb7152685d1aacaa411f8eb9c8c95b0ff571b609c3297a583361cfa3571e8a732206be323c9ea70e4df7c34b2c88f705f0af4ef5effacbe
7
- data.tar.gz: 554d74d6c446a0628a803275e1841d35ad78bf192ba1a35bcd7105995185a244a5f14be0eab17d81484242e20d329414370c78b819afe2c0ff7a3c71dcd8a1a9
6
+ metadata.gz: 3b40ee304d8c9b72f81b80ce0e63687bad7f301ee4fd3f16bfa5628a61a3e5f47d796b1e5a197b93bc6c48fdfb90973a8512db1b283d4403770f4cfdcecb67ac
7
+ data.tar.gz: 15de0a6eacc51bf19cb406ddfd9b0f016ab2720ed4d6a3c6d4b7da835961590b9ba6417a1931518227508b46a6a80e7a68f6de88e126d31f997be02e788492ad
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ree_lib (1.0.121)
4
+ ree_lib (1.0.122)
5
5
  bigdecimal (~> 3.1.6)
6
6
  binding_of_caller (~> 1.0.0)
7
7
  i18n (~> 1.14.1)
@@ -56,6 +56,11 @@ module ReeDto::DtoInstanceMethods
56
56
  @_attrs
57
57
  end
58
58
 
59
+ contract None => Hash
60
+ def to_h
61
+ each_field.to_h
62
+ end
63
+
59
64
  contract Symbol, Any => Any
60
65
  def set_attr(name, val)
61
66
  @_attrs[name] = val
@@ -175,4 +175,11 @@ RSpec.describe ReeDto::DSL do
175
175
  )
176
176
  }
177
177
  end
178
+
179
+ describe "#to_h" do
180
+ it {
181
+ dto = ReeDto::DtoClass.new(string: "str")
182
+ expect(dto.to_h).to eq({ string: "str", with_default: 1 })
183
+ }
184
+ end
178
185
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ReeLib
4
- VERSION = "1.0.121"
4
+ VERSION = "1.0.122"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ree_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.121
4
+ version: 1.0.122
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruslan Gatiyatov