From 97f8a97366b85332c936d29f82bfd0419e84fefc Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Tue, 29 Jan 2019 19:23:32 +0100 Subject: [PATCH] README: Ruby syntax highlighting in the docs --- README.md | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 169c6d9..d2541b2 100644 --- a/README.md +++ b/README.md @@ -14,29 +14,37 @@ Dependencies Usage ----- -* Declare bitemporality inside your model: +Declare bitemporality inside your model: - class HotelPriceVersion < Sequel::Model - end +```ruby +class HotelPriceVersion < Sequel::Model +end - class HotelPrice < Sequel::Model - plugin :bitemporal, version_class: HotelPriceVersion - end +class HotelPrice < Sequel::Model + plugin :bitemporal, version_class: HotelPriceVersion +end +``` -* You can now create a hotel price with bitemporal versions: +You can now create a hotel price with bitemporal versions: - price = HotelPrice.new - price.update_attributes price: 18 +```ruby +price = HotelPrice.new +price.update_attributes price: 18 +``` -* To show all versions: +To show all versions: - price.versions +```ruby +price.versions +``` -* To get current version: +To show current version: - price.current_version +```ruby +price.current_version +``` -* Look at the specs for more usage patterns. +Look at the specs for more usage patterns. Thanks ------ @@ -47,9 +55,6 @@ Thanks to Evgeniy L (@fiscal-cliff) for his contributions: Thanks to Ksenia Zalesnaya (@ksenia-zalesnaya) for her contributions: - define setter methods for versioned columns -Thanks to Denis Kalesnikov (@DenisKem) for his contributions: -- allow composite primary key - License -------