Class: AWSCronParser::Describer::MonthComposer

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/aws_cron_parser/describer/month_composer.rb

Overview

Composes month descriptions

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers

included

Constructor Details

#initialize(config, is_aws: false) ⇒ MonthComposer

Returns a new instance of MonthComposer.



11
12
13
14
# File 'lib/aws_cron_parser/describer/month_composer.rb', line 11

def initialize(config, is_aws: false)
  @month = config[:month]
  @is_aws = is_aws
end

Instance Attribute Details

#is_awsObject (readonly)

Returns the value of attribute is_aws.



9
10
11
# File 'lib/aws_cron_parser/describer/month_composer.rb', line 9

def is_aws
  @is_aws
end

#monthObject (readonly)

Returns the value of attribute month.



9
10
11
# File 'lib/aws_cron_parser/describer/month_composer.rb', line 9

def month
  @month
end

Instance Method Details

#composeObject



16
17
18
19
20
# File 'lib/aws_cron_parser/describer/month_composer.rb', line 16

def compose
  return nil if wildcards?(month)

  FieldDescribers::Month.new(month, is_aws: is_aws).describe
end