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.
337 338 339 340 341 342 343 |
# File 'lib/ruby-macrodroid.rb', line 337 def initialize() super() params = {} constraints(params) end |
Instance Method Details
#constraints(params) ⇒ Object
345 346 347 348 349 350 351 |
# File 'lib/ruby-macrodroid.rb', line 345 def constraints(params) get /^airplane mode (.*)/i do |state| [AirplaneModeConstraint, {enabled: (state =~ /^enabled|on$/) == 0}] end end |