Class: ConstraintsNlp
- Inherits:
-
Object
- Object
- ConstraintsNlp
- Includes:
- AppRoutes
- Defined in:
- lib/ruby-macrodroid.rb
Instance Method Summary collapse
- #constraints(params) ⇒ Object
-
#initialize ⇒ ConstraintsNlp
constructor
A new instance of ConstraintsNlp.
Constructor Details
#initialize ⇒ ConstraintsNlp
Returns a new instance of ConstraintsNlp.
118 119 120 121 122 123 124 |
# File 'lib/ruby-macrodroid.rb', line 118 def initialize() super() params = {} constraints(params) end |
Instance Method Details
#constraints(params) ⇒ Object
126 127 128 129 130 131 132 |
# File 'lib/ruby-macrodroid.rb', line 126 def constraints(params) get /^airplane mode (.*)/i do |state| [AirplaneModeConstraint, {enabled: (state =~ /^enabled|on$/) == 0}] end end |