Sha256: a88ed8435aabe537abe8dc9b4cddbbc108ea242186ccb93b681f18149df37c83
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
require 'singleton' require 'yaml' require 'ostruct' require 'thor' require 'httparty' require 'hanoi/jane/version' require 'hanoi/jane/config' require 'hanoi/jane/towers/stack_finders' require 'hanoi/jane/towers/towers' require 'hanoi/jane/towers/constrained_towers' require 'hanoi/jane/towers/animated_towers' require 'hanoi/jane/animation/animation' require 'hanoi/jane/animation/lifter' require 'hanoi/jane/animation/dropper' require 'hanoi/jane/animation/padded_stacks' require 'hanoi/jane/formatters/matrix' require 'hanoi/jane/formatters/console' module Hanoi module Jane def self.hit_phat stacks, value, phat matrix = Formatters::Matrix.new do |m| m.stacks = stacks m.digits = value end matrix.populate url = "http://#{phat}/lights" payload = { matrix: matrix } headers = { 'Content-Type' => 'application/json', 'Accept' => 'application/json' } HTTParty.patch(url, body: payload.to_json, headers: headers) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hanoi-jane-0.3.0 | lib/hanoi/jane.rb |