Closed kyeah closed 7 years ago
:wave:
When passing in multiple fields to a single attr_x_with_contract call, the current implementation only applies the contract for the first field.
class Thinger include Contracts include Contracts::Attrs attr_accessor_with_contract :a, :b, :c, String end
[development] » t = Thinger.new » #<Test:0x007f934f552dc0> [development] » t.c » nil [development] » t.b » nil [development] » t.a ReturnContractError: Contract violation for return value: Expected: String, Actual: nil Value guarded in: Test::a
This applies the contract and attr_reader individually to each field.
Opened #260 due to the failing 1.9.2 ci check.
Thank you!
:wave:
When passing in multiple fields to a single attr_x_with_contract call, the current implementation only applies the contract for the first field.
This applies the contract and attr_reader individually to each field.