class Calendario::Interval

A list of one or more months

Attributes

months[R]

Array of all months in the period

@api private @return [Array<Month>]

Public Class Methods

new(first_year, first_month, last_year, last_month) click to toggle source

Initialize a time interval

@api private

@param [Integer] first_year The primitive representation of the first year @param [Integer] first_month The primitive representation of the first month @param [Integer] last_year The primitive representation of the last year @param [Integer] last_month The primitive representation of the last month

# File lib/calendario/interval.rb, line 24
def initialize(first_year, first_month, last_year, last_month)
  @first_year = first_year
  @first_month = first_month
  @last_year = last_year
  @last_month = last_month
  @months = (Month.new(first_year, first_month)..Month.new(last_year, last_month)).to_a
end