Class: Switchbot::Scene
- Inherits:
-
Object
- Object
- Switchbot::Scene
- Defined in:
- lib/switchbot/scene.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#scene_id ⇒ Object
readonly
Returns the value of attribute scene_id.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(client:, scene_id:) ⇒ Scene
constructor
A new instance of Scene.
Constructor Details
#initialize(client:, scene_id:) ⇒ Scene
Returns a new instance of Scene.
7 8 9 10 |
# File 'lib/switchbot/scene.rb', line 7 def initialize(client:, scene_id:) @client = client @scene_id = scene_id end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/switchbot/scene.rb', line 5 def client @client end |
#scene_id ⇒ Object (readonly)
Returns the value of attribute scene_id.
5 6 7 |
# File 'lib/switchbot/scene.rb', line 5 def scene_id @scene_id end |
Instance Method Details
#execute ⇒ Object
12 13 14 |
# File 'lib/switchbot/scene.rb', line 12 def execute client.execute(scene_id: scene_id) end |