module Contracts::Attrs
Public Instance Methods
attr_accessor_with_contract(*names, contract)
click to toggle source
# File lib/contracts/attrs.rb, line 13 def attr_accessor_with_contract(*names, contract) attr_reader_with_contract(*names, contract) attr_writer_with_contract(*names, contract) end
attr_reader_with_contract(*names, contract)
click to toggle source
# File lib/contracts/attrs.rb, line 3 def attr_reader_with_contract(*names, contract) Contract Contracts::None => contract attr_reader(*names) end
attr_writer_with_contract(*names, contract)
click to toggle source
# File lib/contracts/attrs.rb, line 8 def attr_writer_with_contract(*names, contract) Contract contract => contract attr_writer(*names) end