Sha256: 5b3f126f5ac9f5964ba317256608dc6b6f9ae0016dbf6f244bd9aee4a723010e
Contents?: true
Size: 552 Bytes
Versions: 10
Compression:
Stored size: 552 Bytes
Contents
module Contracts module Attrs def attr_reader_with_contract(*names, contract) names.each do |name| Contract Contracts::None => contract attr_reader(name) end end def attr_writer_with_contract(*names, contract) names.each do |name| Contract contract => contract attr_writer(name) end end def attr_accessor_with_contract(*names, contract) attr_reader_with_contract(*names, contract) attr_writer_with_contract(*names, contract) end end include Attrs end
Version data entries
10 entries across 10 versions & 3 rubygems