Class: NFCStateConstraint

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

Overview

Category: Device State

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

Returns a new instance of NFCStateConstraint.



731
732
733
734
735
736
737
738
739
# File 'lib/ruby-macrodroid/constraints.rb', line 731

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



741
742
743
# File 'lib/ruby-macrodroid/constraints.rb', line 741

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