Skip to content

Instantly share code, notes, and snippets.

View dpatsora's full-sized avatar

Danylo Patsora dpatsora

View GitHub Profile

Keybase proof

I hereby claim:

  • I am dpatsora on github.
  • I am dpatsora (https://keybase.io/dpatsora) on keybase.
  • I have a public key ASBRWKrqJOWJknx7-19c_zLO3s10HIBRq4PksxL-SHEOFAo

To claim this, I am signing this object:

class Exchange < ApplicationRecord
validates :name, inclusion: { in: ["base", "binance", "bitfaker", "bitfinex", "hitbtc", "huobi", "kraken", "luno", "okex", "rubykube"] }
validates :url, format: {with: URI::regexp(%w(http https))}, :allow_blank => true
validates :rest, format: {with: URI::regexp(%w(http https))}, :allow_blank => true
validates :ws, format: {with: URI::regexp(%w(ws wss))}, :allow_blank => true
validates :rate, :numericality => { :greater_than_or_equal_to => 0}, :allow_blank => true
end
@dpatsora
dpatsora / car.rb
Last active September 5, 2019 13:01
RPM_TO_SPEED_MULTIPLIER = 10
require "minitest/autorun"
require "minitest/pride"
require_relative "delegator.rb"
class Tire # Part of Car
def initialize(producer:, diameter:)
@producer = producer # String
@diameter = diameter # String
@dirty = [true, false].sample # Random state
end