Class: LIFX::Target Private

Inherits:
Object
  • Object
show all
Defined in:
lib/lifx/target.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Target is a high-level abstraction for the target of a Message

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(device_id: nil, site_id: nil, tag: nil, broadcast: nil) ⇒ Target

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Target.



7
8
9
10
11
12
# File 'lib/lifx/target.rb', line 7

def initialize(device_id: nil, site_id: nil, tag: nil, broadcast: nil)
  @site_id   = site_id
  @device_id = device_id
  @tag       = tag
  @broadcast = broadcast
end

Instance Attribute Details

#broadcastObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



6
7
8
# File 'lib/lifx/target.rb', line 6

def broadcast
  @broadcast
end

#device_idObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



6
7
8
# File 'lib/lifx/target.rb', line 6

def device_id
  @device_id
end

#site_idObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



6
7
8
# File 'lib/lifx/target.rb', line 6

def site_id
  @site_id
end

#tagObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



6
7
8
# File 'lib/lifx/target.rb', line 6

def tag
  @tag
end

Instance Method Details

#broadcast?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


14
15
16
# File 'lib/lifx/target.rb', line 14

def broadcast?
  !!broadcast
end

#tag?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


18
19
20
# File 'lib/lifx/target.rb', line 18

def tag?
  !!tag
end