class SetBluetoothAction
Category: Connectivity
Public Class Methods
new(h={})
click to toggle source
Calls superclass method
ConnectivityAction::new
# File lib/ruby-macrodroid/actions.rb, line 846 def initialize(h={}) options = { device_address: '', device_name: '', state: 1 } super(options.merge h) end
Public Instance Methods
to_s(colour: false, indent: 0)
click to toggle source
Calls superclass method
MacroObject#to_s
# File lib/ruby-macrodroid/actions.rb, line 859 def to_s(colour: false, indent: 0) @s = if @h[:state] <= 2 then state = %w(Enable Disable Toggle)[@h[:state]] state + ' Bluetooth' else state = @h[:state] == 3 ? 'Connect' : 'Disconnect' state + ' Audio Device' + "\n" + @h[:device_name] end super() end
Also aliased as: to_summary