README.md in repeatable-0.2.0 vs README.md in repeatable-0.2.1

- old
+ new

@@ -28,11 +28,11 @@ You can create a schedule in one of two ways. #### Composed objects -You can compose each of the expression objects manually. +Instantiate and compose each of the `Repeatable::Expression` objects manually. ```ruby second_monday = Repeatabe::Expression::WeekdayInMonth.new(weekday: 1, count: 2) oct_thru_dec = Repeatable::Expression::RangeInYear.new(start_month: 10, end_month: 12) intersection = Repeatable::Expresson::Intersection.new(second_monday, oct_thru_dec) @@ -41,21 +41,21 @@ ``` #### Hash -Or you can describe the same structure with a `Hash`, and the gem will compose the objects for you. +Or describe the same structure with a `Hash`, and the gem will handle instantiating and composing the objects. ```ruby -args = { - intersection: [ # All included conditions must be met - weekday_in_month: { weekday: 1, count: 2 } # The second Monday of every month - range_in_year: { start_month: 10, end_month: 12 } # October through December +arg = { + intersection: [ + { weekday_in_month: { weekday: 1, count: 2 } }, + { range_in_year: { start_month: 10, end_month: 12 } } ] } -schedule = Repeatable::Schedule.new(args) +schedule = Repeatable::Schedule.new(arg) ``` - - - #### Time Expressions @@ -86,11 +86,11 @@ # The 13th of every month { day_in_month: { day: 13 } } Repeatable::Expression::DayInMonth.new(day: 13) -# Any day in October +# All days in October { range_in_year: { start_month: 10 } } Repeatable::Expression::RangeInYear.new(start_month: 10) # All days from October through December { range_in_year: { start_month: 10, end_month: 12 } } @@ -101,10 +101,10 @@ Repeatable::Expression::RangeInYear.new(start_month: 10, end_month: 12, start_day: 1, end_day: 20) ``` ### Getting information from a Schedule -Ask your schedule one of three questions: +Ask a schedule one of three questions. ```ruby schedule.next_occurrence # => Date of next occurrence