class Hue::RequestBody

Attributes

alert[RW]
bri[RW]
ct[RW]
effect[RW]
hue[RW]
on[RW]
sat[RW]
scene[RW]
transitiontime[RW]

Public Class Methods

new(options={}) click to toggle source
# File lib/alexa_hue/hue/request_body.rb, line 7
def initialize(options={})
  options.each {|k,v| self.send("#{k}=".to_sym, v)}
end

Public Instance Methods

clear_scene() click to toggle source
# File lib/alexa_hue/hue/request_body.rb, line 15
def clear_scene
  @scene = nil
end
reset() click to toggle source
# File lib/alexa_hue/hue/request_body.rb, line 11
def reset
  @hue, @ct, @scene = nil, nil, nil
end
to_hash(without_scene:false) click to toggle source
# File lib/alexa_hue/hue/request_body.rb, line 23
def to_hash(without_scene:false)
  hash = {hue: @hue, ct: @ct, bri: @bri, sat: @sat, transitiontime: @transitiontime, on: @on, effect: @effect, alert: @alert}
  hash.merge!(scene: @scene) if without_scene
  return hash
end
to_json(without_scene:false) click to toggle source
# File lib/alexa_hue/hue/request_body.rb, line 19
def to_json(without_scene:false)
  return self.to_hash(without_scene: without_scene).to_json
end