Class: GPSEnabledConstraint

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

Overview

Category: Connectivity

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 = {}) ⇒ GPSEnabledConstraint

Returns a new instance of GPSEnabledConstraint.



226
227
228
229
230
231
232
233
234
# File 'lib/ruby-macrodroid/constraints.rb', line 226

def initialize(h={})

  options = {
    enabled: true
  }

  super(options.merge h)

end

Instance Method Details

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



236
237
238
# File 'lib/ruby-macrodroid/constraints.rb', line 236

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