Class: Octo::Rules

Inherits:
Object
  • Object
show all
Includes:
MongoMapper::Document, Record
Defined in:
lib/octocore-mongo/models/enterprise/rules.rb

Constant Summary collapse

DAILY =

Types of conversions

0
WEEKLY =
1
WEEKENDS =
2
ALTERNATE =
3

Constants included from MongoMapper::Document

MongoMapper::Document::DUMP_ATTRS

Class Method Summary collapse

Methods included from Record

#unique_id

Methods included from MongoMapper::Document

#marshal_dump, #marshal_load, redis, update_cache_config

Class Method Details

.duration_typesHash

Fetches the types of durations

Returns:

  • (Hash)

    The name and its duration value



33
34
35
36
37
38
39
40
# File 'lib/octocore-mongo/models/enterprise/rules.rb', line 33

def duration_types
  {
    Octo::Rules::DAILY => 'Daily',
    Octo::Rules::WEEKLY => 'Weekly',
    Octo::Rules::WEEKENDS => 'Weekends',
    Octo::Rules::ALTERNATE => 'Alternate Days'
  }
end