Class: MonthOfYearConstraint

Inherits:
Constraint show all
Defined in:
lib/ruby-macrodroid.rb

Overview

Category: Date/Time

Instance Attribute Summary

Attributes inherited from MacroObject

#options, #siguid, #type

Instance Method Summary collapse

Methods inherited from Constraint

#match?

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ MonthOfYearConstraint

Returns a new instance of MonthOfYearConstraint.



5174
5175
5176
5177
5178
5179
5180
5181
5182
# File 'lib/ruby-macrodroid.rb', line 5174

def initialize(h={})

  options = {
    months: [false, false, false, false, false, false, false, true, false, false, false, false]
  }

  super(options.merge h)

end

Instance Method Details

#to_s(colour: false) ⇒ Object Also known as: to_summary



5184
5185
5186
# File 'lib/ruby-macrodroid.rb', line 5184

def to_s(colour: false)
  'MonthOfYearConstraint ' + @h.inspect
end