Sha256: e25828819828984c7294337a80609f65d18d36904192ecea06d69c10d3b244d2

Contents?: true

Size: 565 Bytes

Versions: 2

Compression:

Stored size: 565 Bytes

Contents

require 'thor'
require 'httparty'

require 'hanoi/jane/version'

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

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

2 entries across 2 versions & 1 rubygems

Version Path
hanoi-jane-0.2.3 lib/hanoi/jane.rb
hanoi-jane-0.2.2 lib/hanoi/jane.rb