once you have installed the lifx gem you can try this:
require 'lifx'
# set the label of the bulb you want to "flicker"
label = 'YourBulbLabel'
client = LIFX::Client.lan
# find the light with the label you have set in your LAN
client.discover! do |c|
c.lights.with_label(label)
end
# turn on the lights
client.lights.turn_on
light = client.lights.with_label(label)
# make it flicker
light.set_color(LIFX::Color.hsbk(259, 0.1, 0.5, 5000), duration: 1)
sleep 1
light.set_color(LIFX::Color.hsbk(259, 1, 1, 5000), duration: 1)
sleep 1
light.set_color(LIFX::Color.hsbk(259, 0.1, 0.5, 5000), duration: 1)
sleep 1
hope this gets you started
the documentation helped me a lot: http://www.rubydoc.info/github/lifx/lifx-gem/master/LIFX/