Class: Mobiscroll::Connect::RecurrenceRule

Inherits:
Struct
  • Object
show all
Defined in:
lib/mobiscroll/connect/models.rb

Overview

iCal-style recurrence rule. ‘frequency` is one of “DAILY”, “WEEKLY”, “MONTHLY”, “YEARLY”.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#by_dayObject

Returns the value of attribute by_day

Returns:

  • (Object)

    the current value of by_day



146
147
148
# File 'lib/mobiscroll/connect/models.rb', line 146

def by_day
  @by_day
end

#by_monthObject

Returns the value of attribute by_month

Returns:

  • (Object)

    the current value of by_month



146
147
148
# File 'lib/mobiscroll/connect/models.rb', line 146

def by_month
  @by_month
end

#by_month_dayObject

Returns the value of attribute by_month_day

Returns:

  • (Object)

    the current value of by_month_day



146
147
148
# File 'lib/mobiscroll/connect/models.rb', line 146

def by_month_day
  @by_month_day
end

#countObject

Returns the value of attribute count

Returns:

  • (Object)

    the current value of count



146
147
148
# File 'lib/mobiscroll/connect/models.rb', line 146

def count
  @count
end

#frequencyObject

Returns the value of attribute frequency

Returns:

  • (Object)

    the current value of frequency



146
147
148
# File 'lib/mobiscroll/connect/models.rb', line 146

def frequency
  @frequency
end

#intervalObject

Returns the value of attribute interval

Returns:

  • (Object)

    the current value of interval



146
147
148
# File 'lib/mobiscroll/connect/models.rb', line 146

def interval
  @interval
end

#untilObject

Returns the value of attribute until

Returns:

  • (Object)

    the current value of until



146
147
148
# File 'lib/mobiscroll/connect/models.rb', line 146

def until
  @until
end

Instance Method Details

#to_wireObject



150
151
152
153
154
155
156
157
158
159
# File 'lib/mobiscroll/connect/models.rb', line 150

def to_wire
  wire = { 'frequency' => frequency }
  wire['interval'] = interval unless interval.nil?
  wire['count'] = count unless count.nil?
  wire['until'] = self[:until] unless self[:until].nil?
  wire['byDay'] = by_day unless by_day.nil?
  wire['byMonthDay'] = by_month_day unless by_month_day.nil?
  wire['byMonth'] = by_month unless by_month.nil?
  wire
end