Class: DayOfMonthConstraint

Inherits:
Constraint show all
Defined in:
lib/ruby-macrodroid/constraints.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 = {}) ⇒ DayOfMonthConstraint

Returns a new instance of DayOfMonthConstraint.



507
508
509
510
511
512
513
514
515
516
# File 'lib/ruby-macrodroid/constraints.rb', line 507

def initialize(h={})

  options = {
    day_names: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"],
    days_of_month: [false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false]
  }

  super(options.merge h)

end

Instance Method Details

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



518
519
520
# File 'lib/ruby-macrodroid/constraints.rb', line 518

def to_s(colour: false, indent: 0)
  'DayOfMonthConstraint ' + @h.inspect
end