README.md in smart_value-object-0.1.0 vs README.md in smart_value-object-0.2.0

- old
+ new

@@ -1,6 +1,6 @@ -# SmartCore::ValueObject &middot; [![Gem Version](https://badge.fury.io/rb/smart_value-object.svg)](https://badge.fury.io/rb/smart_value-object) [![Build Status](https://travis-ci.org/smart-rb/smart_value-object.svg?branch=master)](https://travis-ci.org/smart-rb/smart_value-object) +# SmartCore::ValueObject &middot; [![Gem Version](https://badge.fury.io/rb/smart_value-object.svg)](https://badge.fury.io/rb/smart_value-object) Value Object pattern realized in scope of Ruby. --- @@ -37,14 +37,14 @@ ## Synopsis ```ruby class Address < SmartCore::ValueObject - attribute :country, 'string' - attribute :city, 'string' - property :location, 'string' - property :capital, 'boolean' + attribute :country, 'value.string' # an alias of SmartCore::Types::Value::String (see smart_initializer gem) + attribute :city, 'value.string' + property :location, 'value.string' + property :capital, SmartCore::Types::Value::Boolean end khabarovsk = Address.new('Russia', 'Khabaovsk', location: '48.4814/135.0721', capital: false) same_city = Address.new('Russia', 'Khabaovsk', location: '48.4814/135.0721', capital: false) another_city = Address.new('Russia', 'Moscow', location: '59.9311/30.3609', capital: false) @@ -68,17 +68,46 @@ ``` ```ruby # comparability: khabarovsk == same_city # => true -khabarovsk == another_city # false +khabarovsk == another_city # => false ``` ```ruby # default Enumerable behavior: khabarovsk.to_a # => [khabarovsk] khabarovsk.each { |entity| puts entity } # => outputs itself ``` + +--- + +## Roadmap + +- Migrate to `GitHub Actions`; + +--- + +## Build + +- run tests: + +```shell +bundle exec rspec +``` + +- run code style checks: + +```shell +bundle exec rubocop +``` + +- run code style checks with auto-correction: + +```shell +bundle exec rubocop -A +``` + --- ## Contributing