Sha256: 35fd94d2b608c91d9b664d267de8d69a0eb2f39d0f6ce5b20f3090f22844a762

Contents?: true

Size: 512 Bytes

Versions: 6

Compression:

Stored size: 512 Bytes

Contents

require 'thor'
require 'httparty'

require 'hanoi/jane/version'
require 'hanoi/jane/towers'
require 'hanoi/jane/constrained_towers'
require 'hanoi/jane/matrix'

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

6 entries across 6 versions & 1 rubygems

Version Path
hanoi-jane-0.2.0 lib/hanoi/jane.rb
hanoi-jane-0.1.4 lib/hanoi/jane.rb
hanoi-jane-0.1.3 lib/hanoi/jane.rb
hanoi-jane-0.1.2 lib/hanoi/jane.rb
hanoi-jane-0.1.1 lib/hanoi/jane.rb
hanoi-jane-0.1.0 lib/hanoi/jane.rb