Module: MerchCalendar

Extended by:
Util
Defined in:
lib/merch_calendar.rb,
lib/merch_calendar/util.rb,
lib/merch_calendar/version.rb,
lib/merch_calendar/merch_week.rb,
lib/merch_calendar/configurable.rb,
lib/merch_calendar/configuration.rb,
lib/merch_calendar/date_calculator.rb

Defined Under Namespace

Modules: Util Classes: Configuration, DateCalculator, MerchWeek

Constant Summary collapse

VERSION =
'0.0.1'

Class Attribute Summary collapse

Class Method Summary collapse

Methods included from Util

end_of_month, end_of_quarter, end_of_year, julian_to_merch, merch_to_julian, start_of_month, start_of_quarter, start_of_year, weeks_for_month, weeks_in_year

Class Attribute Details

.configurationConfiguration

Returns the global configuration object

Returns:


9
10
11
# File 'lib/merch_calendar/configurable.rb', line 9

def configuration
  @configuration ||= Configuration.new
end

Class Method Details

.configure {|configuration| ... } ⇒ void

This method returns an undefined value.

Used in initializers to set the global configuration

Yields:


16
17
18
# File 'lib/merch_calendar/configurable.rb', line 16

def configure
  yield(configuration)
end

.reset_config!void

This method returns an undefined value.

Resets the configuration to default values


23
24
25
# File 'lib/merch_calendar/configurable.rb', line 23

def reset_config!
  @configuration = Configuration.new
end