OOP

My take on how to write simpler Ruby code.

Installation

Add this line to your application's Gemfile:

gem 'oop'

And then execute:

$ bundle

Or install it yourself as:

$ gem install oop

Usage

Documentation is missing right now. But the code is very short (< 200 lines). Subclass either of OOP::Value, OOP::Cell, OOP::Boundary and your class will benefit from from the OOP messaging firewall IF:

  1. You don't use def (use message method instead)
  2. You don't use constants within that class (Constants in Ruby are anything that begins with a capital letter)

Exceptions:

  1. if subclassing OOP::Boundary, it's ok to use constants
  2. To use trusted values like Math, see value_spec.rb in this gem for an example

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/sergueif/oop. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.