Sha256: d27079d05503c8daaec6b8ee13b67a7577efdb7544669d6ad42094e5b93806e8

Contents?: true

Size: 596 Bytes

Versions: 1

Compression:

Stored size: 596 Bytes

Contents

require 'thor'
require 'httparty'

require 'hanoi/jane/version'

require 'hanoi/jane/towers'
require 'hanoi/jane/constrained_towers'
require 'hanoi/jane/animation'

require 'hanoi/jane/formatters/matrix'
require 'hanoi/jane/formatters/console'

module Hanoi
  module Jane
    def self.hit_phat towers, phat
      url = "http://#{phat}/lights"
      payload = {
        matrix: towers.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.2.5 lib/hanoi/jane.rb